VPS novice tutorial ⑦: LNMPA installation and use tutorial « Zhaorong Tribe

VPS novice tutorial ⑦: LNMPA installation and use tutorial

Time: July 23, 2011 Column: VPS Tutorial Author: Zhao Rong Click: 51813 times

 Proprietary computer room/advanced anti DDoS server/advanced anti DDoS VPS/American advanced anti DDoS/Los Angeles VPS/Los Angeles advanced anti DDoS server

In fact, I have introduced to you before LNMP One click installation package (back Look here, Gu )The one button installation package has both praise and criticism. However, there is no doubt that the one button installation package is a good choice for novice players like Zhao Rong.

 VPS novice tutorial ⑦: LNMPA installation and use tutorial

Why did you say it today LNMPA How about the installation and use of? The main thing is that recently I changed the space, and the VPS in my hand basically doesn't give away panels, so there are more problems when I use more. So, let's summarize it here and use it as a note to make a note.

LNMP A represents the website server architecture of Nginx, MySQL, PHP and Apache under Linux. Different from the previous LNMP, Apache support is added. Using Nginx as a front-end service can make static pages, js, pictures, etc. faster and more timely. When a client requests to access a dynamic page, Nginx's reverse proxy will be sent to Apache for processing, and Apache will send it to Nginx after processing and return it to the client.

[LNMPA installation]

First, we need to install LNMP. I won't go into details about this process. The following commands are listed:

#wget -c http://soft.vpser.net/lnmp/lnmp0.7.tar.gz

#tar zxvf lnmp0.7.tar.gz

#cd lnmp0.7/

#./ centos.sh

Then wait for the installation to complete. Later, we can optionally install acceleration (./accelerator.sh) and encryption (./ionCube. sh) components. Next, start to install Apache. It is very simple and requires only one command:

#./ apache.sh

After that, we still wait for the system to compile automatically. After that, we can open the default page.

[Use of LNMPA]

As for Zhao Rong, I think the biggest convenience brought by the addition of Apache is that it can directly support. htaccess files, and there is no need to bother with pseudo static rules.

Add virtual host:/root/vhost.sh

To delete a virtual host: rm/usr/local/nginx/conf/vhost/domain.conf At the same time, you need: rm/usr/local/apache/conf/vhost/domain.conf

LNMPA status management:/root/lnmpa {start | stop | reload | restart | kill | status}

Nginx status management:/etc/init.d/nginx {start | stop | reload | restart}

PureFTPd status management:/etc/init.d/pureftpd {start | stop | restart | kill | status}

MySQL status management:/etc/init.d/mysql {start | stop | restart | reload | force reload | status}

Apache state management:/etc/init.d/httpd {start | stop | restart | graceful | graceful stop | configetest | status}

Nginx main configuration file:/usr/local/nginx/conf/nginx.conf
MySQL configuration file:/etc/my.cnf
PHP configuration file:/usr/local/php/etc/php.ini
PureFtpd configuration file:/usr/local/pureftpd/pure-ftpd.conf
PureFtpd MySQL configuration file:/usr/local/pureftpd/pureftpd-mysql.conf
Apache configuration file:/usr/local/apache/conf/httpd.conf

LNMPA Upgrade PHP Version:/ Upgrade_lnmpa_php.sh (Note: execute in the lnmp directory)

[Difficulties and miscellaneous problems and application skills]

1. To upgrade wordpress plug-ins in the LNMPA environment, you need to enter an FTP account:

Chown - R www: www/home/(website directory)

2. Email sending problem under Debian

The Debian template uses exim4 as the mail server by default (not our common sendmail), which needs simple configuration to support mail sending. The method is: change dc_exitconfig_configtype='local' in/etc/exim4/update-exim4.conf.conf to dc_exitconfig_configtype='internet', and use the following command to restart Exim4.

invoke-rc.d exim4 restart

After the 3.64bit system installs LNMP, it prompts that the database password is incorrect and cannot be managed. What should I do?

Execute the following script to reset the password!

wget http://soft.vpser.net/lnmp/ext/reset_mysql_root_password.sh ; sh reset_mysql_root_password.sh

4. MySQL Disable Log

In/etc/my.cnf

Put # log bin=mysql bin

#Binlog_format=mixed

5. Modify the number of nginx processes

In the/usr/local/nginx/conf/nginx.conf file

Generally, it does not need to be modified. If your VPS gives you dual cores, you can modify the worker_processes value to 2

6. Modify the number of php cgi processes

Modify the number of php cgi processes

In/usr/local/php/etc/php fpm.conf

Modify<value name="max_children">12</value>256M memory generally, which can be set to 12

7. Modify the maximum number of simultaneously connected files

The default value of the system is 1024, which should be larger

Use ulimit - a to view all the limit values of the current system, and ulimit - n to view the current maximum number of open files.

The newly installed Linux only has 1024 by default. When it is used as a server with heavy load, it is easy to encounter error: too many open files. Therefore, it needs to be enlarged.

Use ulimit - n 65535 to modify it immediately, but it will be invalid after restart. (Note: ulimit - SHn 65535 is equivalent to ulimit - n 65535, - S refers to soft, - H refers to hard)

There are three modification methods as follows:

① Add a line ulimit SHn 65535 in/etc/rc.local

② Add a line ulimit SHn 65535 in/etc/profile

③ Add the following two lines of records at the end of/etc/security/limits.conf

* soft nofile 65535

* hard nofile 65535

The first method in CentOS has no effect, the third method has effect, and the second method in Debian has effect.

8. Change the ssh default port

Edit/etc/ssh/sshd

The default value is 22. It is recommended to modify

In order to avoid SSH login failure after modification, it is recommended to add a port number first, and then delete port 22 after confirmation of connection (Debian system is:/etc/ssh/sshd_config)

9. Modify the ROOT password (of course, this step can be completed directly in the SolusVM background)

After logging in to SSH with the ROOT account, enter passwd and then enter the new password again

It is recommended to set it to more than 9 digits and English numeral character combination

 Advanced Defense VPS/Los Angeles Advanced Defense/Advanced Defense Server/20 year old computer room

Statement: Blogs are only for sharing information and are not recommendations. Websites do not participate in transactions and are not intermediaries. The content only represents personal views and is not authoritative. Readers should consider it and take their own risks! Every penny and every commodity is still the eternal truth. Juvenile readers (including physical and psychological) should visit this website with their guardians! This article is written by( Zhao Rong )Original compilation, reprint, please keep the link: VPS novice tutorial ⑦: LNMPA installation and use tutorial The code is not easy, please do not copy or paste!
About using: This website mainly shares server and VPS information, and does not provide any product sales or purchase. All visitors please purchase and use products within the scope of national laws and regulations. QQ group discussion: 683851361
About safety: Any IDC has the possibility of going bankrupt and running away. The host line is even more uncontrollable. Monthly payment and backup are your best choices. Please keep good and regular backup habits

VPS novice tutorial ⑦: LNMPA installation and use tutorial: there are 40 messages at present

  1. 14th floor
    YaoYaoNow :

    Hello, blogger, I'm a novice named Xiaobai. Where should I leave the page after the environment is configured?

    2017-02-15 21:13 [Reply]
    • Zhao Rong :

      According to the official help of lnmp, add a domain name (virtual host), generate a directory, and put the website page file in the relevant directory.
      If the domain name is not added, the directory directly accessed by IP is/home/wwwroot/default

      2017-02-15 21:39 [Reply]
      • YaoYaoNow :

        Thank you. Would it be easier for me to put a static page first? What should I do?

        2017-02-15 21:43 [Reply]
        • Zhao Rong :

          No matter what page you put, you can directly refer to the official instructions of lnmp,
          All are incoming webpage files to relevant directories

          2017-02-15 21:47 [Reply]
          • YaoYaoNow :

            Ok, I succeeded today, thank you!

            2017-02-16 09:58 [Reply]
  2. 13th floor
    zrbloggg :

    The environment installed on the OVH server is lnmpa, and a wordpress is installed on the [sub domain name], but an error 502 Bad Gateway appears when you open wp-admin/plugins.php and/wp-admin/themes.php, [but other pages can be opened normally, and the wordpress installed under the main domain name after testing is normal]. Some information is found online, but it doesn't work, Thank you for your advice, Brother Zhao and Brother Rong

    2014-05-25 19:02 [Reply]
    • Zhao Rong :

      32bit system mv/usr/lib/libsqlite3. so. 0.8.6/usr/lib/libsqlite3. so. 0.8.6.bak
      64bit system mv/usr/lib64/libsqlite3. so. 0.8.6/usr/lib64/libsqlite3. so. 0.8.6.bak
      For php5.2. *, upgrade to 5.3*

      2014-05-25 19:19 [Reply]
      • It's really solved. Thank you very much, Brother Zhao and Brother Rong. I can't control my excitement at this moment. Please let me call you "Shifu"

        2014-05-25 20:30 [Reply]
        • Zhao Rong :

          。。。 Wukong...

          2014-05-25 20:38 [Reply]
  3. 12th floor
    chancat :

    Hello, Rongrong, if you have any problems, please give me some advice,
    The environment needs 5.4+zend support. It is almost crying when it is set up. It also needs to install a control panel. Is there a solution?
    Or you can pay for the service! thank you very much!

    2014-05-16 10:31 [Reply]
    • Zhao Rong :

      Zend in 5.4 is Zend Guard Loader, which can be compiled in any environment.
      CPANEL or DirectAdmin can be selected for the charge control panel, and there are many free options.

      2014-05-16 10:34 [Reply]
      • chancat :

        Thanks for your reply. It is the Zend Guard Loader that needs support. At present, all packages are installed by one click. It is troublesome to manually compile the configuration I need. I have found many generation maintenance providers in Alibaba Cloud and are unwilling to take orders. I am very depressed. Please help me find out if there is an lnamp environment with panels that I need to configure like this.

        2014-05-17 00:57 [Reply]
  4. 11th floor
    wzz :

    Can I modify the domain name bound when installing lnmp?

    2012-09-06 20:18 [Reply]
    • Zhao Rong :

      Edit/usr/local/nginx/conf/nginx. conf to find the domain name entered during installation, modify it to the domain name you want to set, save it, and execute:/usr/local/nginx/sbin/nginx - s reload.
      But I suggest that you should fill in a domain name randomly when compiling lnmp, and add the domain name of the website later.

      2012-09-06 21:00 [Reply]
  5. 10th floor
    Webwatch Blog :

    Does 123system have SolusVM background? I can't find it

    2012-09-03 07:35 [Reply]
    • Zhao Rong :

      Please read the VPS activation email. 123sysytems definitely has a soluvm management panel.

      2012-09-03 07:36 [Reply]
  6. 9th floor
    HeavenIn :

    Please consult the blogger..
    If you have installed lnmpa but not php fpm. conf, how can you set the number of threads..
    Also, after I installed it, when I visited the website, there were many problems. Through the top command, I found that php fpm occupied a lot of CPU, and the website responded slowly. The website was wordpress.
    Some php fpms have been used for hundreds of hours. Is this normal?
    I have been tortured by this thing for a long time. Please solve it~~

    2012-08-10 16:48 [Reply]
    • Zhao Rong :

      This is no problem, you don't have to worry too much!
      However, if you install WordPress for your own use, you can use lnmp directly. nginx is much cheaper than Apache!

      2012-08-10 19:00 [Reply]
  7. 8th floor
    chnq :

    6. Modify the number of php cgi processes

    Modify the number of php cgi processes

    In/usr/local/php/etc/php fpm.conf

    Modify 12. Generally, 256M memory can be set to 12

    If LNMPA does not have this php fpm. conf file, can Yoo Rong of lnmp make a mistake?

    2012-07-21 15:55 [Reply]
    • Zhao Rong :

      Oh, tragedy. This one actually includes LNMP and LNMPA. It's not written separately. Let's laugh~

      2012-07-21 15:56 [Reply]
  8. 7th floor
    ko :

    Blogs are always unable to register and comment, and the response is very slow. After submitting twice, it becomes repeated, and the background still displays

    2012-07-15 18:05 [Reply]
  9. 6th floor
    Literature agency :

    Does LNMPA not support the mail() function? thank you! I installed the wp program and tested it by forgetting the password. The prompt: unable to send email. Possible cause: Your host has disabled the mail() function

    2011-11-19 02:06 [Reply]
    • Zhao Rong :

      The probe test shows that the mail function will never be disabled.

      2011-11-19 06:47 [Reply]
      • The probe tested and the mail function was not disabled. Sendmail was installed and set according to the online method, but it is still not available

        2011-11-19 18:25 [Reply]
        • Zhao Rong :

          For WordPress, it is better to install a plug-in to solve the mail problem.

          2011-11-19 18:35 [Reply]
  10. It seems that LNMPA is much better than LAMP

    2011-11-14 15:16 [Reply]
  11. 4th floor
    I am :

    /After centos.sh, the putty is often disconnected, and it seems that it cannot get in during the installation process 😯

    What do you do when you go in 😯

    2011-08-01 12:01 [Reply]
    • Zhao Rong :

      Tragedy. Try sending a tk to the official to describe the problem and ask them to change the node to you.

      2011-08-01 12:02 [Reply]
      • I don't understand. Do you have any ready-made English 🙁

        2011-08-01 12:20 [Reply]
        • Zhao Rong :

          Muyou, I always write a paragraph in Chinese, and then Google takes it out...

          2011-08-01 12:22 [Reply]
  12. floor
    Luo Ping :

    Good. Learn from the past and learn from the new

    2011-07-24 06:19 [Reply]
  13. Bench
    CoolMoon :

    What is the minimum memory requirement for installing LNMPA?

    2011-07-23 23:26 [Reply]
    • Zhao Rong :

      I have installed it in 128MB of memory, but for Apache, it is better to have 256MB of memory.

      2011-07-23 23:37 [Reply]
      • CoolMoon :

        How much memory will be displayed after LNMPA is installed?

        2011-07-24 01:34 [Reply]
        • Zhao Rong :

          60-80MB。

          2011-07-24 01:45 [Reply]
          • Brother Cheng :

            Hello, I'm a novice. I want to ask you a question

            2015-10-15 18:47 [Reply]
          • Brother Cheng :

            I used HostUS's vps American host (Los Angeles), and I used Putty to connect to the server successfully, but I don't know what to do next. I checked a lot on Baidu and didn't find the appropriate tutorial. I hope you can help me. Thank you very much.

            2015-10-15 18:50 [Reply]
            • Zhao Rong :

              What you do next is related to what you want to do with VPS, which cannot be decided for you by others.
              For example, if you want to build a website, first install and configure the basic environment required by a website.

              2015-10-15 18:52 [Reply]
  14. sofa
    I am :

    Wow, Brother Rong, it's a lot of sponsorship

    2011-07-23 06:45 [Reply]

Comment


 hostyun  locvps

Advertise