Install Nginx + PHP-FPM + MySQL on Low-end CentOS server

There are many good low-end VPS provider over there with low cost, such as RamNode providing $2/month for their 128mb VPS, so the question is how can we do on a low-end CentOS server? Well, the answer is: you can run many websites on it with some tweak configurations. Let’s discover how to do this.

On CentOS 5

Run

[bash]wget http://freevps.us/downloads/nginx-centos.sh -O – |bash[/bash]

OR

[bash]wget http://www.comfortvps.com/script/shell/nginx/nginx-php-mysql.sh -O – |bash[/bash]

On CentOS 6

Run

[bash]yum -y install wget –noplugins
wget freevps.us/downloads/nginx-centos-6.sh -O – |bash[/bash]

Troubleshooting

There might be some problems after the installing.

  • If mysqld service cannot start due to the bug of no mysql user, run the post-installation scripts as follows: [bash]groupadd -g 89 mysql &>/dev/null
    useradd -u 89 -g mysql -d /var/lib/mysql -s /bin/false mysql &>/dev/null
    /usr/bin/mysql_install_db –user=mysql –basedir=/usr
    chown -R mysql:mysql var/lib/mysql &>/dev/null[/bash]
  • If you cannot access mysql due to root password, remember to reset mysql root password.

Well, finally, this is my server status after these installations

[bash][root@backup ~]# free -m
total used free shared buffers cached
Mem: 256 82 173 0 0 47
-/+ buffers/cache: 34 221
Swap: 256 1 254
[/bash]

Similar Posts

  • Install Apache Solr on CentOS 6

    Solr is the popular, blazing fast open source enterprise search platform from the Apache LuceneTM project. Its major features include powerful full-text search, hit highlighting, faceted search, near real-time indexing, dynamic clustering, database integration, rich document (e.g., Word, PDF) handling, and geospatial search. Solr is highly reliable, scalable and fault tolerant, providing distributed indexing, replication…

  • Migrate Gitlab to new server

    When migrating gitlab to a new server, you might face much problems of in-compatible versions, different OS (so different latest gitlab version), etc. The best way is to upgrade the old server to the same latest gitlab version, then backup gitlab, and then transfer the backup to the new server, install same latest gitlab version…

  • Install OpenVPN server CentOS 7

    Today I will brief necessary steps for installing OpenVPN server CentOS 7. This will include custom server name and also rules for csf firewall which is widely used. The OpenVPN server name in this tutorial will be myvpnserver, associated domain will be myvpnserver.myserver.com, and server IP address is XXX.YYY.ZZZ.UUU . We will user a self-signed certificate…

  • OwnCloud with NginX and PostgreSQL

    This quick tutorial will help you run the OwnCloud with NginX and PostgreSQL on Ubuntu 14.04. Add the necessary repo to /etc/apt/sources.list: [bash]# nginx stable deb http://nginx.org/packages/ubuntu/ trusty nginx deb-src http://nginx.org/packages/ubuntu/ trusty nginx # nginx mainline deb http://nginx.org/packages/mainline/ubuntu/ trusty nginx deb-src http://nginx.org/packages/mainline/ubuntu/ trusty nginx[/bash] Update system: [bash]apt-get update apt-get dist-upgrade[/bash] Install nginx: [bash]apt-get install nginx[/bash] Install dependencies for…

Leave a Reply

Your email address will not be published. Required fields are marked *