In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Editor to share with you how to build a linux server, I believe that most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!
The construction of linux server can be divided into the following steps: log in to the server to install Apache and configure it, then restart, install MySQL and set root password, and finally download the installation script with one click, grant permissions and execute the script.
LAMP is the open source software commonly used to build dynamic websites or servers, which refers to Linux (operating system), ApacheHTTP server, the first letter of MySQL (sometimes MariaDB, database software) and PHP (sometimes Perl or Python). It is generally used to build web application platform. Currently, about 70% of access traffic is provided through LAMP.
(1) Log in to the server using putty or similar SSH tools (local installation skips)
(2) install Apache
Yum install httpd
Modify firewall configuration to open port 80
Vi / etc/sysconfig/iptables
Add record
-An INPUT-m state-- state NEW-m tcp-p tcp-- dport 80-j ACCEPT
(3) configure Apache
Vi / etc/httpd/conf/httpd.conf
Find ServerName and set it to your own domain name. If there is no domain name, you can set it to localhost:80.
(4) restart and test Apache
Service httpd restart
Open the browser, type http://ip, and you can see the test page of Apache
(5) install MySQL
Yum install mysql mysql-server
Modify firewall configuration to open port 3306
Vi / etc/sysconfig/iptables
Add record
-An INPUT-m state-- state NEW-m tcp-p tcp-- dport 3306-j ACCEPT
Set MySQL to boot automatically
Chkconfig mysqld on
(6) set root password
Mysql_secure_installation
After entering, enter y to set the password. After setting the password, enter all the way until: Thanks for using MySQL!
Restart MySQL
Service mysqld restart
(7) install PHP
Yum install php
Install PHP components
Yum install php-mysql php-gd libjpeg* php-imap php-ldap php-odbc php-pear php-xml php-xmlrpc php-mbstring php-mcrypt php-bcmath php-mhash libmcrypt
(8) restart Apache and MySQL
Create info.php
Vi / var/www/html/info.php
Content:
The browser opens http://ip/info.php to test.
(9) download the one-click installation script and grant permissions
Wget-O lamp.zip https://github.com/teddysun/lamp/archive/master.zipunzip lamp.zipcd lamp-master/chmod + x * .sh
Execute script
. / lamp.sh
Install httpd, MYSQL and PHP versions in turn according to the prompts, and press any key to install them automatically after setting up.
(10) installation is complete. We can see the PHPMYADMIN directory, MYSQL path and other information, including the set database password.
The above is all the contents of the method of building a linux server, thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, 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.