Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The method of building LNMP environment by Ubuntu

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article introduces the relevant knowledge of "the method of Ubuntu to build LNMP environment". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

Call up the command line interface, type "cd / usr/local/src" enter, and enter into the folder, which is used to save the software installation package you need.

Then type "sudo wget http://downloads.mysql.com/archives/mysql-5.0/mysql-5.0.45.tar.gz" enter, if prompted for a password, enter the password and enter, start downloading the installation package file, and wait for the progress bar to go to the end of the download.

When the download is complete, type "ll" to view the downloaded file.

Extract the installation package file, type "sudo tar zxvf mysql-5.0.45.tar.gz" enter, and start the decompression operation until it is finished.

After decompressing, enter the installation directory and type "cd mysql-5.0.45/" to enter.

Type "sudo. / configure-- prefix=/usr/local/server/mysql/-- enable-assembler-- with-extra-charsets=complex-- enable-thread-safe-client-- with-big-tables-- enable-local-infile-- with-plugins=innobase" enter to start the configuration installation until the following figure shows that the operation is completed successfully.

We install all the environment under "/ usr/local/server", so we need to set up a directory first. Enter "sudo mkdir / usr/local/server" to create the directory.

Set the owner of the directory to "xinxueqi.com" and execute the command "sudo chown-R xinxueqi.com:xinxueqi.com / usr/local/server" (in the picture, xinxueqi:xinxueqi is not xinxueqi.com:xinxueqi.com, here is the user name: user group, you can set it according to the actual situation) enter.

Then start compiling MySQL and type "sudo make & & make install clean" in the mysql-5.0.45 directory.

The following information will be displayed when the compilation is complete.

Enter the MySQL directory, type "cd / usr/local/server/mysql" enter, and then enter "ll" to view the list of files in the directory.

Create a configuration file and type "cp. / share/mysql/my-medium.cnf. / my.cnf" to enter.

Then install the default database file and type ". / bin/mysql_install_db" enter.

Set up the service startup script and execute "sudo cp. / share/mysql/mysql.server / etc/init.d/mysql" enter.

Then execute "sudo chmod + x / etc/init.d/mysql" enter.

Then use "/ etc/init.d/mysql start" and "/ etc/init.d/mysql stop" to run and end the mysql service.

Finally, set the database root password, this step should be performed when the database is running, first "/ etc/init.d/mysql start" start the database, and then execute ". / bin/mysqladmin-u root password 123456" (123456 is the password, set according to the actual situation) enter.

This is the end of the MySQL database installation.

This is the end of the content of "how to build a LNMP environment for Ubuntu". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

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.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report