webdevRefinery Forum: getting a vServer - webdevRefinery Forum

Jump to content

  • 2 Pages +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

Rate Topic: -----

Poll: getting a vServer (11 member(s) have cast votes)

Which OS should I use?

  1. debian 6.0 (3 votes [27.27%] - View)

    Percentage of vote: 27.27%

  2. ubuntu server 11.10 (7 votes [63.64%] - View)

    Percentage of vote: 63.64%

  3. CentOS 6.0 (1 votes [9.09%] - View)

    Percentage of vote: 9.09%

  4. other (0 votes [0.00%])

    Percentage of vote: 0.00%

Which server should I use?

  1. Apache2 (2 votes [18.18%] - View)

    Percentage of vote: 18.18%

  2. Lighthttpd (1 votes [9.09%] - View)

    Percentage of vote: 9.09%

  3. nginx (6 votes [54.55%] - View)

    Percentage of vote: 54.55%

  4. other (2 votes [18.18%] - View)

    Percentage of vote: 18.18%

Vote Guests cannot vote

User is offline Kyek 

  • Founder of wdR
  • Group: Administrators
  • Posts: 5078
  • Joined: 20-February 10
  • LocationPhiladelphia, PA, USA
  • Expertise:HTML,CSS,PHP,Java,Javascript,Node.js,SQL

Posted 30 January 2012 - 12:28 PM (#21)

callumacrae, on 30 January 2012 - 12:17 PM, said:

I don't get what Ubuntu has over Debian as a server. I have *never* seen Ubuntu used in a professional environment. While Ubuntu is superior for home desktops, it's crap for use as a server, and people are only going with it because of the name.

I've used it at eBay, it runs all the production servers at my current company, and anything I launch on AWS nowadays is on it. There is a very very distinct separation between Ubuntu for desktops, and Ubuntu Server. Even at the most core level, desktop Ubuntu's kernel process scheduler favors short-running userland applications that need to support many different simultaneous processes and threads, while Ubuntu Server is fine-tuned for long-running processes that benefit from minimal thread switching. Debian's kernel strikes more of a balance between the two, which, right from the core, gives Ubuntu Server an advantage.

It also comes with administration packages that are pre-configured for Ubuntu's setup, not to mention Ubuntu Server's service management system that gives you a better grip on daemon processes than the independent scripts that Debian relies on. It's also managed and maintained by a company with a vested interest in the platform and control over the codebase, which has proven beneficial to server OSes in the past (See RHEL) because contributions are better curated and release/update schedules are better controlled.

Not to say Debian is a poor choice for a server OS -- until relatively recently, Debian has been my go-to. Ubuntu Server is an extremely sane choice now, though, and shouldn't be dismissed just because of its name or the fact that it gained popularity on the desktop.
0


User is online gibbonweb 

  • 兄ヨハネス
  • Group: Members
  • Posts: 2062
  • Joined: 23-June 10
  • LocationMunich(DE)
  • Expertise:HTML,CSS,PHP,Javascript,Python,SQL,Graphics

Posted 30 January 2012 - 12:33 PM (#22)

callumacrae, on 30 January 2012 - 12:17 PM, said:

I don't get what Ubuntu has over Debian as a server. I have *never* seen Ubuntu used in a professional environment. While Ubuntu is superior for home desktops, it's crap for use as a server, and people are only going with it because of the name.

are you talking about ubuntu server or ubuntu?
and why is ubuntu server crap for use as a server, if it's built on debian testing?
as far as I can see it really comes down to wether you need mature, stable (..."old") versions of everything or if you want to have a server system which tries to be up to date with what happens in the open source world. I prefer the latter, but if I ran a big business and every instability would cost me money, I obviously would go for debian.
Also, the LTS variant of ubuntu-server has 5 years of support, which is 2 years more than debian offers.
0


User is offline Lemon 

  • I have a dream...
  • Group: Members
  • Posts: 688
  • Joined: 24-February 11
  • Expertise:HTML,CSS,PHP,Javascript,Node.js,SQL

Posted 30 January 2012 - 01:37 PM (#23)

gibbonweb, on 30 January 2012 - 10:14 AM, said:

it's some serious shit. you might as well take a look at their site: http://gwan.com/ ;)

The fact that their site is full of marketing hyperbole, bad statistics and false self-rewarding ("the only web server to scale on multiple CPUs": seriously never heard of the threading and process models of Apache or nginx?) makes me doubtful it's actually that great. Digging into the site reveals one potential reason why it's so fast in their comparisons: they are running a C script on their server vs PHP on Apache and various others. Now, a C based site will hands-down trounce a PHP script any day of the week; however, the prospect of designing a site in C to get that sort of speed boost is frankly grim. A somewhat equal analogy is writing assembly code to echo "Hello word" to a HTTP request, sure it's gonna be fast on a benchmark but that doesn't make it remotely useful for hosting my site.
If they really want me to take their benchmarks seriously, they should compare based upon a common metric.
Posted Image
In the end, it's not the years in your life that count. It's the life in your years
0


User is offline Ruku 

  • I do Linux and that Internet thing.
  • Group: Members
  • Posts: 1351
  • Joined: 17-April 10
  • Location/root
  • Expertise:HTML,CSS,PHP,Javascript,Python,SQL

Posted 30 January 2012 - 03:41 PM (#24)

callumacrae, on 30 January 2012 - 12:17 PM, said:

I don't get what Ubuntu has over Debian as a server. I have *never* seen Ubuntu used in a professional environment. While Ubuntu is superior for home desktops, it's crap for use as a server, and people are only going with it because of the name.

A sure sign that you drink the kool aid with no understanding of a professional environment. Debian has no commercial backing, and is dependent upon a community to sign, seal, deliver, support and keep releasing. Ubuntu is strapped firmly to Canonical, who provide commercial support and enterprise-class services to ensure fixes for security issues identified in their distributions are fixed as soon as is humanly possible. Oh, and they help us with change management processes that prevent us from breaking thousands of sites during upgrades, too! A steady, predictable release cycle is a necessity when you're talking of large scale deployments.

Whilst your own personal sites might not be of value, professional hosting companies and services companies are dependent upon strong uptime. The Debian community has proven over and over again that it can't handle any of these responsibilities.
0


User is offline Daniel15 

  • dan.cx
  • Group: Moderators
  • Posts: 3415
  • Joined: 17-April 10
  • LocationMelbourne, Australia
  • Expertise:HTML,CSS,PHP,Java,Javascript,Node.js,SQL

Posted 30 January 2012 - 06:35 PM (#25)

Quote

It's bad practice to log into your server as root...right? should I create a new user, and if so, how? I've never dealt with user management on a linux box.

Run something like
adduser gibbonweb
as root. Set a password that's strong (and different to your root password). Edit
/etc/sudoers
and add your name to the bottom (look at the comments for info on the format). Then store your root password somewhere (maybe in Lastpass or KeePass if you use apps like those) and never log in as root again :P

Once you've done this, to run commands as root, put
sudo
before the command. And to get a root shell, use
sudo -i


Quote

Daniel, tell me more about this G-WAN server. The graphs that I'm seeing are showing that it's super fast compared to other servers.

It's designed for serving static files. Most coding for it is done in C, although it looks like they've added support for other languages (Objective C, Google's Go) recently.

And apparently it makes your servers 320,000x higher. Seems legit.

Microsoft's IIS 7 is quite a good web server (definitely faster than Apache) but their benchmarks say otherwise, so I'm kinda skeptical. http://gwan.com/benchmark
Daniel15! :D
Posted Image

Repeat after me: jQuery is not JavaScript. It is not the answer to every JavaScript-related question. When you have to write some JavaScript, do not instantly react with "Oh, I'll do that with jQuery!"

Spoiler
0


User is online gibbonweb 

  • 兄ヨハネス
  • Group: Members
  • Posts: 2062
  • Joined: 23-June 10
  • LocationMunich(DE)
  • Expertise:HTML,CSS,PHP,Javascript,Python,SQL,Graphics

Posted 31 January 2012 - 10:05 AM (#26)

Daniel15, on 30 January 2012 - 06:35 PM, said:

Run something like
adduser gibbonweb
as root. Set a password that's strong (and different to your root password). Edit
/etc/sudoers
and add your name to the bottom (look at the comments for info on the format). Then store your root password somewhere (maybe in Lastpass or KeePass if you use apps like those) and never log in as root again :P

Once you've done this, to run commands as root, put
sudo
before the command. And to get a root shell, use
sudo -i


Done, works great.

btw, what's the difference between sudo -i and sudo su?



___________________________________________________________

OK new problem, trying to get MySQL & PHP running:

my phpinfo() doesn't show the mysql section although I have the mysql packages installed (also php5-mysql).
Is there something I have to set up?
0


User is offline Kyek 

  • Founder of wdR
  • Group: Administrators
  • Posts: 5078
  • Joined: 20-February 10
  • LocationPhiladelphia, PA, USA
  • Expertise:HTML,CSS,PHP,Java,Javascript,Node.js,SQL

Posted 31 January 2012 - 10:42 AM (#27)

sudo -s and sudo -i are extremely similar, and just open up a shell for the root:
-s [command]
                   The -s (shell) option runs the shell specified by the SHELL environment variable if it is set or the shell
                   as specified in passwd(5).  If a command is specified, it is passed to the shell for execution.  Otherwise,
                   an interactive shell is executed.

-i [command]
                   The -i (simulate initial login) option runs the shell specified in the passwd(5) entry of the target user as
                   a login shell.  This means that login-specific resource files such as .profile or .login will be read by the
                   shell.  If a command is specified, it is passed to the shell for execution.  Otherwise, an interactive shell
                   is executed.  sudo attempts to change to that user's home directory before running the shell.  It also
                   initializes the environment, leaving DISPLAY and TERM unchanged, setting HOME, MAIL, SHELL, USER, LOGNAME,
                   and PATH, as well as the contents of /etc/environment on Linux and AIX systems.  All other environment
                   variables are removed.


sudo su, on the other hand, does the same thing but it does it by processing the 'su' command as the root user, which results in a separate shell instance being loaded. So the end result is the same, but 'sudo su' takes slightly more resources.

Regarding the MySQL issue, can you show us what's in /etc/php5/conf.d, and the contents of any obvious mysql-related file? If there's nothing there, search your php.ini (probably not that exact filename, but the phpinfo() page tells you which ini is being used) for mysql.
0


User is online gibbonweb 

  • 兄ヨハネス
  • Group: Members
  • Posts: 2062
  • Joined: 23-June 10
  • LocationMunich(DE)
  • Expertise:HTML,CSS,PHP,Javascript,Python,SQL,Graphics

Posted 31 January 2012 - 10:52 AM (#28)

thx @sudo explanations.

Kyek, on 31 January 2012 - 10:42 AM, said:

Regarding the MySQL issue, can you show us what's in /etc/php5/conf.d, and the contents of any obvious mysql-related file? If there's nothing there, search your php.ini (probably not that exact filename, but the phpinfo() page tells you which ini is being used) for mysql.


/etc/php5/conf.d:
jbecker@Ubuntu-1110-oneiric-64-minimal:/etc/php5/conf.d$ ls -l
total 64
-rw-r--r-- 1 root root  54 2011-12-13 19:29 curl.ini
-rw-r--r-- 1 root root  50 2011-12-13 19:29 gd.ini
-rw-r--r-- 1 root root  60 2011-05-30 23:17 imagick.ini
-rw-r--r-- 1 root root  54 2011-09-20 19:17 imap.ini
-rw-r--r-- 1 root root  58 2011-02-22 18:18 mcrypt.ini
-rw-r--r-- 1 root root 229 2010-12-13 19:48 memcache.ini
-rw-r--r-- 1 root root  57 2011-12-13 19:29 mysqli.ini
-rw-r--r-- 1 root root  56 2011-12-13 19:29 mysql.ini
-rw-r--r-- 1 root root  52 2011-12-13 19:29 pdo.ini
-rw-r--r-- 1 root root  60 2011-12-13 19:29 pdo_mysql.ini
-rw-r--r-- 1 root root  62 2011-12-13 19:29 pdo_sqlite.ini
-rw-r--r-- 1 root root  60 2011-12-13 19:29 sqlite3.ini
-rw-r--r-- 1 root root  58 2011-12-13 19:29 sqlite.ini
-rw-r--r-- 1 root root  54 2011-12-13 19:29 tidy.ini
-rw-r--r-- 1 root root  59 2011-12-13 19:29 xmlrpc.ini
-rw-r--r-- 1 root root  52 2011-12-13 19:29 xsl.ini


And:
jbecker@Ubuntu-1110-oneiric-64-minimal:/etc/php5/conf.d$ tail mysqli.ini 
; configuration for php MySQL module
extension=mysqli.so
jbecker@Ubuntu-1110-oneiric-64-minimal:/etc/php5/conf.d$ tail mysql.ini 
; configuration for php MySQL module
extension=mysql.so
jbecker@Ubuntu-1110-oneiric-64-minimal:/etc/php5/conf.d$ tail pdo.ini 
; configuration for php PDO module
extension=pdo.so
jbecker@Ubuntu-1110-oneiric-64-minimal:/etc/php5/conf.d$ tail pdo_mysql.ini 
; configuration for php MySQL module
extension=pdo_mysql.so


And the mysql section of php.ini says:
Spoiler

0


User is offline Kyek 

  • Founder of wdR
  • Group: Administrators
  • Posts: 5078
  • Joined: 20-February 10
  • LocationPhiladelphia, PA, USA
  • Expertise:HTML,CSS,PHP,Java,Javascript,Node.js,SQL

Posted 31 January 2012 - 11:07 AM (#29)

That's unreal. You've restarted the process after installing the mysql bits, right? If you're using PHP-FPM, you'll want to restart that service directly. Most anything else, you'll want to restart the webserver.

If you already did that, hit us with the listing of loaded INI files in the phpinfo().
1


User is online gibbonweb 

  • 兄ヨハネス
  • Group: Members
  • Posts: 2062
  • Joined: 23-June 10
  • LocationMunich(DE)
  • Expertise:HTML,CSS,PHP,Javascript,Python,SQL,Graphics

Posted 31 January 2012 - 11:10 AM (#30)

Kyek, on 31 January 2012 - 11:07 AM, said:

That's unreal. You've restarted the process after installing the mysql bits, right? If you're using PHP-FPM, you'll want to restart that service directly. Most anything else, you'll want to restart the webserver.

If you already did that, hit us with the listing of loaded INI files in the phpinfo().

aha! I'm an idiot. restarting php-fpm has resolved the problem, I imagined installing everything would take all necessary actions to make things work. well... now it does ;)
thanks!
0


User is offline Daniel15 

  • dan.cx
  • Group: Moderators
  • Posts: 3415
  • Joined: 17-April 10
  • LocationMelbourne, Australia
  • Expertise:HTML,CSS,PHP,Java,Javascript,Node.js,SQL

Posted 31 January 2012 - 04:46 PM (#31)

Don't feel stupid, it's a common error (and I still do it sometimes). Installing PHP packages seems to restart Apache (if using the Apache module) but not PHP-FPM. Not sure if it's intentional or just an oversight :P
Daniel15! :D
Posted Image

Repeat after me: jQuery is not JavaScript. It is not the answer to every JavaScript-related question. When you have to write some JavaScript, do not instantly react with "Oh, I'll do that with jQuery!"

Spoiler
0


Share this topic:


  • 2 Pages +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

2 User(s) are reading this topic
0 members, 2 guests, 0 anonymous users


Enter your sign in name and password


Sign in options
  Or sign in with these services