When we chose Symfony to implement [url], PHP 5 was needed but we only had PHP 4 installed in our Ubuntu hosting servers. We couldn¡¯t just migrate everyone to PHP 5 since some of client¡¯s applications were incompatible with PHP 5. Some tutorials were found online explaining how to run PHP 4 and PHP 5 simultaneously such as [url] and [url]but they all used CGI. As you probably know, CGI is not scalable and we needed to scale in PHP4 and PHP5 since we needed to server millions of hits in both configurations. The following are additional the requirements we had:
1. Run Apache
2. Use mod_php for both PHP versions.
3. Run eAccelerator with both PHP versions.
4. Use as many Ubuntu packages as possible to ease maintenance issues and easily deploy on multiple servers.
5. Use Ubuntu 6.06.1 LTS
The solution we came up with was to run Apache 2 with PHP 5 and run Apache 1 with PHP 4 on separate IPs. Ubuntu comes already with these packages. The only package we had to compile was eAccelerator. The following lists the steps taken to get this setup:
Apache 2 with PHP 5
* apt-get install apache2 libapache2-mod-php5 php5 php5-cli php5-curl php5-gd php5-mysql php5-dev make php5-mcrypt php5-imap
* vi /etc/php5/cli/php.ini and uncomment extension=mysql.so
* vi /etc/apache2/ports.conf and put Listen Your.IP.Goes.Here:80
* a2enmod expires
* vi /etc/apache2/conf.d/hosting
<VirtualHost *>
DocumentRoot /home/httpd/mainpage
ServerName mainpage.com
ServerAlias www.mainpage.com
Options Includes FollowSymlinks
AddType application/x-httpd-php .php
DirectoryIndex index.php index.html index.htm
</VirtualHost># Cache images and javascripts
ExpiresActive on
ExpiresByType image/gif ¡°access plus 1 week¡±
ExpiresByType image/jpeg ¡°access plus 1 week¡±
ExpiresByType image/png ¡°access plus 1 week¡±
ExpiresByType image/x-icon ¡°access plus 4 week¡±
ExpiresByType application/x-javascript ¡°access plus 4 week¡±
ExpiresByType application/x-shockwave-flash ¡°access plus 4 week¡±
* cd /usr/local/src
* wget http://bart.eaccelerator.net/source/...-0.9.5.tar.bz2
* tar xjvf eaccelerator-0.9.5.tar.bz2
* cd eaccelerator-0.9.5/
* phpize5
* ./configure
* make
* make install
* mkdir /var/tmp/{eaccelerator4,eaccelerator5}
* chown www-data /var/tmp/eaccelerator*
* chmod 700 /var/tmp/eaccelerator*
* vi /etc/php5/apache2/php.ini and add the following:
zend_extension=¡±/usr/lib/php5/20051025/eaccelerator.so¡±
eaccelerator.shm_size=¡±0¡å
eaccelerator.cache_dir=¡±/var/tmp/eaccelerator5¡å
eaccelerator.enable=¡±1¡å
eaccelerator.optimizer=¡±1¡å
eaccelerator.check_mtime=¡±1¡å
eaccelerator.debug=¡±0¡å
eaccelerator.filter=¡±"
eaccelerator.shm_max=¡±0¡å
eaccelerator.shm_ttl=¡±0¡å
eaccelerator.shm_prune_period=¡±0¡å
eaccelerator.shm_only=¡±0¡å
eaccelerator.compress=¡±1¡å
eaccelerator.compress_level=¡±9¡å
Apache 1 with PHP 4
* apt-get install libapache-mod-php4 php4-mysql php4-gd apache-ssl apache-common libzzip-0-12 php4-common php4-dev apache
* dpkg-reconfigure apache and uncheck mod_userdir and check mod_php4 and cancel on hostname
* vi /etc/apache/httpd.conf and make sure to add this
Listen Your.SECONDIP.Goes.Here:80
NameVirtualHost *# Cache images and javascripts
ExpiresActive on
ExpiresByType image/gif ¡°access plus 1 week¡±
ExpiresByType image/jpeg ¡°access plus 1 week¡±
ExpiresByType image/png ¡°access plus 1 week¡±
ExpiresByType image/x-icon ¡°access plus 4 week¡±
ExpiresByType application/x-javascript ¡°access plus 4 week¡±
ExpiresByType application/x-shockwave-flash ¡°access plus 4 week¡±Remove the following
<IfModule mod_alias.c>
Alias /icons/ /usr/share/apache/icons/
<Directory /usr/share/apache/icons>
Options Indexes MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>
Alias /images/ /usr/share/images/
<Directory /usr/share/images>
Options MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>
</IfModule>
<IfModule mod_alias.c>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory /usr/lib/cgi-bin/>
AllowOverride None
Options ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
</IfModule>
Change
<Directory />
Options SymLinksIfOwnerMatch
AllowOverride All
</Directory>
ServerSignature Off
ServerTokens Prod
* cd /usr/local/src
* rm -rf eaccelerator-0.9.5
* tar xjvf eaccelerator-0.9.5.tar.bz2
* cd eaccelerator-0.9.5/
* phpize4
* ./configure ¨Cwith-php-config=/usr/bin/php-config4
* make
* make install
* vi /etc/php4/apache/php.ini and add the following:
zend_extension=¡±/usr/lib/php4/20050606/eaccelerator.so¡±
eaccelerator.shm_size=¡±0¡å
eaccelerator.cache_dir=¡±/var/tmp/eaccelerator4¡å
eaccelerator.enable=¡±1¡å
eaccelerator.optimizer=¡±1¡å
eaccelerator.check_mtime=¡±1¡å
eaccelerator.debug=¡±0¡å
eaccelerator.filter=¡±"
eaccelerator.shm_max=¡±0¡å
eaccelerator.shm_ttl=¡±0¡å
eaccelerator.shm_prune_period=¡±0¡å
eaccelerator.shm_only=¡±0¡å
eaccelerator.compress=¡±1¡å
eaccelerator.compress_level=¡±9¡å
I'm interested in having an unmanaged VPS with Ubuntu 7.1 or 8.04 installed (or available to Rebuild under the HyperVM) from the state of Missouri (should have at least some IPs already available from the region).
Are there any issues with Running Cpanel w/ WHM? long story short I heard it had issues with making domains and users because root isn't a user..? I like ubuntu but never ran cpanel on it. I want to use Ubuntu on my dedi. I'm not trying to start a ubuntu vs centos.
Does anyone know of a provider that has an Ubuntu Desktop VPS? I've got accounts with fsckvps and xensmart but they only have centos ones - I'll install gnome on of them if I really have to but i'd prefer todo as little leg work as possible as it's for personal use.
Which operative system you mostly use on your server?Right now i have only centos installations,but it seems ubuntu have larger file repository with their apt system compared to yum.
I am all too familiar with php on my win box but now am working on Linux.
the extension_dir is commented out (??) however CURL does work but there is nothing about CURL in php.ini. I cant find any php.so files.
Also the php.ini file lives in /etc/php5/apache2
Does this look like a standard install? Where do the .so files live?
Ultimatly I want to install Turck MMCache which requires some extensions and when ever I try to do phpize there is the error message Cannot find config.m4 (google is not helping solve the problem)
apt-get install m4 says I have the latest version.
phpize is a shortcut in usr/bin that points to etc/alternatives/phpize which in turn is a shortcut to usr/bin/phpize5
I am trying to create a database using the following method:./mysqladmin create db But I get the following error:./mysqladmin: connect to server at 'localhost' failed error: 'Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)' Check that mysqld is running and that the socket: '/tmp/mysql.sock' exists! I am new to configuring mysql. I have installed it etc but not sure how to start it. I tried the following to start the server:moe@moe-desktop:/usr/local/mysql$ sudo bin/mysqld_safe --user=mysql
I've just ordered a dedicated server with Ubuntu server, but they've come back to me to say that they've had trouble installing Ubuntu server on these particular servers.
As an alternative, they're offering to install Debian. My concern is that I come from a windows background and have spent the last month reading and playing with Ubuntu Server in vmware. I'll be running a small handful of sites on the server and will rely on the apt-get and package installer in webmin to get things set up and for administration. I'll dabble in the shell a little, but only when needed.
Should I go with a different host that can offer Ubuntu, or will I be okay with Debian?
I restarted again in live boot mode of course and now when I go to computer I see the 104.8GB volume drive. (wasn't there before), this is the Windows partition
When I try to open it I get an error
unable to mount the selected volume error: device /dev/sda2 is not removable error: could not execute pmount
So I ran sudo mount /dev/sda2 /media/windows -t ntfs -r -o uid=999,gid=999,umask=444 and now I get "you do not have the permissions necessary to view the contents of 'windows'
Have been trying to get BFD and APF Antidos (not at same time) to work on Ubuntu 5.10 / Plesk and 6.06 (No Plesk yet) servers. APF appears to work fine after checking /sbin/iptables -L -n
Both cronjobs run but getting a lot of brute force attacks to ssh and Plesk but no offending IP's are being blocked and no e-mails reporting that they are being blocked. Log files for BFD and Antidos are always "0". Everything setup and configured the same as on my previous CentOS servers.
Can't find much on the net with this newer OS. Can anyone point me in the right direction to get one of these to work on the systems above? Thought it might be a path error referencing rc.d but put a symlink in for that and no change.
The past week I've been trying to answer the hardest question. I'm an expert windows user and a Novice Linux user.
I have a server built and ready for an operating system, this will be a development server for database and web development. It will also likely turn into an encrypted file server as well.
I do not plan on doing much else other then that.
Is it worth it to struggle through and learn the Linux command line or should I go for Windows Server something I am more familiar with?
I've considered VMware although I have "Fake Raid" and ESXi does not see my Raid-1 setup.
I have a complete 512mb vps on slicehost.com All configuring went well.
But for some reason I can't get my email-server to work. I have followed all tutorials on articles.slicehost.com/email Also I have installed atmail(.org) on my subdomain for email.
I always get the error the password isn't correct. Also when I try with Outlook.
The password is encrypted.
I understand an email setup is a complicated thing, and you probably need more information. But do you guys have any suggestions on what it might be? I'm a newbie, so it surely can be a newbie issue.
Cant seem to find anywhere that has a tutorial or instructions on how to install mod security for ubuntu gutsy, has anyone installed it lately and like to share their experience or tell how? Ive google to try find answer about 4 times now in last 2 weeks and still havent found anything.
I'm trying to compile PHP 5.2.1 on my Ubuntu 6.10 server. I've downloaded the source code from php.net and am running the following configure command on it:
Code: ./configure --with-apxs2=/usr/bin/apxs2 --with-mysql --with-informix=/opt/informix --enable-shared --enable-pdo=shared --without-sqlite --without-pdo-sqlite --with-pdo-mysql=shared --with-zlib --with-xml --with-pdo-informix=shared,/opt/informix After doing this, then make, I copy over the generated libphp5.so file into my Apache extensions directory, add extension=pdo.so (and lines for the PDO-MySQL/Informix extensions) into my php.ini and restart Apache. I would expect to see PDO, PDO-MySQL and PDO-Informix listed in my phpinfo() - but they don't appear.
So, I tried recompiling PHP but without any of the PDO extensions being shared. This worked, and I could see PDO and PDO-MySQL in phpinfo(), but not PDO-Informix.
So, can anyone hazard a guess as to why none of the PDO extensions load when compiled shared? I don't get any related error messages in the Apache or System logs by the way....
I'm setting up a Linux machine specifically for use as a VNC here at work.
The IT Manager said he'd used Ubuntu before but left the distro up to me.
I set up my test machine with Ubuntu but need to compile Apache for portions of it to work. I've never had any problems building Apache before, but this is what I'm getting here. I have a feeling that, since I've not used Ubuntu before, that I'm just missing a step. I also noticed that the "make" command doesn't work. Does that need to be installed and compiled as well?
========================================= root@vnc01:/etc/httpd-2.2.3# ./configure /usr/local/apache configure: WARNING: you should use --build, --host, --target configure: WARNING: invalid host type: /usr/local/apache checking for chosen layout... Apache checking for working mkdir -p... yes checking build system type... /usr/local/apache checking host system type... /usr/local/apache checking target system type... /usr/local/apache
Configuring Apache Portable Runtime library ...
checking for APR... reconfig configuring package in srclib/apr now configure: WARNING: you should use --build, --host, --target configure: WARNING: invalid host type: /usr/local/apache checking build system type... /usr/local/apache checking host system type... /usr/local/apache checking target system type... /usr/local/apache Configuring APR library Platform: /usr/local/apache checking for working mkdir -p... yes APR Version: 1.2.7 checking for chosen layout... apr checking for /usr/local/apache-gcc... no checking for gcc... no checking for /usr/local/apache-cc... no checking for cc... no checking for cc... no checking for /usr/local/apache-cl... no checking for cl... no configure: error: no acceptable C compiler found in $PATH See `config.log' for more details. configure failed for srclib/apr root@vnc01:/etc/httpd-2.2.3#
The config.log file doesn't honestly show any errors that I can see pertaining to any compile errors.