Linux electives samba + apache + php + mysql

Source: Internet
Author: User
Tags localhost mysql
Linux elective examination samba + apache + php + mysql -- Linux Enterprise Application-Linux server application information. The following is a detailed description. 1. samba Configuration

Start the vmvm, enter redhat, and press ctrl + alt to switch to the original operating system.

Run cmd and run the ipconfig/all command to view your network IP address (local connection)

Remember IP addresses (and gateways)

Return to redhat, right-click to create a terminal

# Netconfig

Enter the ip address, and set the ip address to the same ip address segment that you just found using the ipconfig command.

(Generally, the following three are available by default .)

#/Etc/rc. d/init. d/network start (what is the difference between restart! The same is true)

Choose system Settings> Server Settings> samba settings.

Add User

Configuration server

Set Shared Folders

Return to Terminal

# Service smb start (restart)

# Ping 192.168.X.X (check whether it can be connected to the original operating system)

Go back to the original operating system and open IE

Enter \ 192.168.X.X (this is the IP address just set by the Virtual Operating System)

Generally, you can open the shared folder you just set.

Attackers can store mysql installation files in linux.

In this step, you can select different methods, such as installing vmtools and ftp transmission. (If samba is configured, you can run chmod 777 on the terminal. <共享文档的位置> You can share the file), or mount a usb

2. apache configuration

This step is not easy to understand. Because it is automatically installed by the system, many specific folders are unknown.

However, you only need to know the location of the home page folder!

Choose system Settings> Server Settings> http Settings> VM> document root directory.

The default value is/var/www/html/

3. Install mysql

Decompress mysql obtained in the Virtual Operating System to/usr/local (you can decompress the file on the GUI. Here, decompress the file and name it mysql)

Open INSTALL-BINARY in the decompressed folder

The installation steps are described in English.

[Root @ localhost ~] # Groupadd mysql
[Root @ localhost ~] # Useradd-g mysql
[Root @ localhost ~] # Cd/usr/local/mysql
[Root @ localhost mysql] # scripts/mysql_install_db -- user = mysql (this step is required when mysql is installed for the first time, otherwise an error will occur)
[Root @ localhost mysql] # chown-R root. (mysql space. Do not write an error in this format)
[Root @ localhost mysql] # chown-R mysql data
[Root @ localhost mysql] # chgrp-R mysql.
[Root @ localhost mysql] # bin/mysqld_safe -- user = mysql &

(Starting mysqld daemon with databases from/usr/local/mysql/data appears. No other errors below indicate that mysql is successfully started)

[Root @ localhost mysql] #/usr/local/mysql/bin/mysql-u root mysql (default password-less access to mysql)

OK.
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.