In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-14 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
In this issue, the editor will bring you about how to build lamp services using CVM. The article is rich in content and analyzed and described from a professional point of view. I hope you can get something after reading this article.
Usually, LAMP in a CVM environment represents Linux, Apache, MySQL and PHP, respectively, and is suitable for users who are familiar with the Linux operating system. When operating, there are some differences in different versions of the software, so we should take the actual version of the software as the standard. The general process is to prepare the compilation environment and install the above 4.
First, prepare the compilation environment
1. Use the wizard to create an instance. Use the management terminal to connect to the Linux instance.
two。 Enter the command cat / etc/redhat-release to view the system version.
3. Turn off the firewall. Close SELinux.
4. Restart the system for the settings to take effect. Release the required port entry direction rules.
Second, install Apache
1. Install the dependency package. Download the source code package that decompresses Apache,Apr and Apr-util. Move the folders of Apr and Apr-util to the srclib folder of Apache. Compile.
Cd / usr/local/src/httpd-2.4.37./buildconf./configure-- prefix=/usr/local/apache2\-- enable-SSL\-- enable-so\-- with-mpm=event\-- with-included-apr\-- enable-cgi\-- enable-rewrite\-- enable-mods-shared=most\-enable-mpms-shared=allmake & & make install
two。 Set the PATH environment variable.
Echo "export PATH=$PATH:/usr/local/apache2/bin" > / etc/profile.d/httpd.shsource / etc/profile.d/httpd.sh
3. Enter the command httpd-v to view the version number of Apache. Add the startup configuration file for Apache. Enter the command vi / usr/lib/systemd/system/httpd.service to open the startup configuration file for Apache, press the I key, and write the following in the configuration file:
[Unit] Description=The Apache HTTP ServerAfter= network.target [service] Type=forkingExecStart=/usr/local/apache2/bin/apachectl-k startExecReload=/usr/local/apache2/bin/apachectl-k gracefulExecStop=/usr/local/apache2/bin/apachectl-k graceful-stopPIDFile=/usr/local/apache2/logs/httpd.pidPrivateTmp=true [Install] WantedBy=multi-user.target
Press the ESC key, then type: wq and enter to save and close the Apache startup configuration file.
4. Start the Apache service and set the boot to start automatically.
Systemctl start httpdsystemctl enable httpd
Third, then install MySQL and install PHP in turn.
Fourth, finally install phpMyAdmin
1. Prepare the phpMyAdmin data storage directory
Cdmkdir-p / usr/local/apache2/htdocs/phpmyadmin
two。 Download the phpMyAdmin package and unzip it
Wget https://files.phpmyadmin.net/phpMyAdmin/4.0.10.20/phpMyAdmin-4.0.10.20-all-languages.zipunzip phpMyAdmin-4.0.10.20-all-languages.zip
3. Copy the phpMyAdmin file to the prepared data storage directory
Mv phpMyAdmin-4.0.10.20-all-languages/* / usr/local/apache2/htdocs/phpmyadmin
4. Enter http:// instance public network IP/phpmyadmin in the local machine browser to access the phpMyAdmin login page.
The above is what Xiaobian shared with you about how to build lamp services using CVM. If you happen to have similar doubts, please refer to the above analysis. If you want to know more about it, you are welcome to follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.