"description" Finally, Server AH server, you have tortured me, but now I am very satisfied with the state.
"description" The picture below is I have been engaged in the two days, the content can not be said to be repeated, can only be said to constantly modify the changes, error error.
1)
Virtual Host
The so-called virtual host refers to a server running several websites, providing web, FTP, mail and other services.
IP-based methods, host-name-based methods and port-based Judge law.
① IP-based methods:
Bind multiple IPs on the server, then configure the Web server to bind multiple websites to different IPs. Visit different IPs and see different websites.
② Port-based methods:
An IP address that is accessed through different ports on different websites.
③ Host Name-based method:
Set up a records for multiple domain names so that they resolve to the same IP address, that is, on the same server. Then, configure the Web service side on the server, add multiple sites, and set a host name for each site. Because the HTTP protocol access request contains host name information, when the Web server receives an access request, it can access different Web sites depending on the host name.
2)
This is the installation of the Oneinstack one-click Deployment
The following virtual host was later unloaded by me, no use on
This is the creation of an FTP account
View service Status
FileZilla File Transfer
Originally want to through the FTP service to send data to the server's corresponding directory, but through NAVICAT export only SQL file, this time is wondering, you say, SQL such file can directly run on the server?
Or does the import run through the command line?
Return to reply: In the MySQL command state, the source command can import SQL statements
It's like, I'm going to go to the server to install a MySQL database graphical user interface, but choose what? Or a navicat? Or a phpmyadmin already installed?
After looking at someone else's blog and discovering that there is a Navicat server version, Phpmyadmain is not a problem when the amount of data is small, but importing large amounts of data requires caution.
2)
Nginx started to have problems, should be the configuration file modification problem, next time remember to modify the configuration file back to ***conf_original
3)
Modify the file with a large number of VI commands, this is still necessary to familiarize yourself.
4)
can display the installed PHP module
5)
This is the import database.
One: Completed today
- 23. Deploy your own services to the server, including the Maven,mysql client. Run unit tests directly with MAVEN commands.
Q: What is your service? MAVEN is the project that was built? Do you need to pack it first? Deployment is a specific directory where you upload packaged files to a server by command? How does the MySQL client upload? What if it's navicat? Is it installed on the server side? How does it work after installation? MAVEN Command run unit test? Do you want to run the test file that was written in the uploaded project? is MAVEN + operational? Like Compile,clean,install,run,test??
Next Step Verification!
First found that the user directory has hidden files, is/home/ubuntu under the
To view the Tomcat boot log, found no
Is this nginx good or not?
Shut down the virtual host
View ports
This is a good command. SED, can be annotated
Open the Nginx Welcome page (Oh, no, it's oneinstack)
6) Display port information
The parameters of the netstat command are described below:
-T: Indicates that the TCP port is displayed
-U: Indicates the display of UDP ports
-L: Only listen sockets (so-called sockets are programs that enable applications to read and receive communication protocols (protocol) and data)
-P: Displays the process identifier and program name, and each socket/port belongs to a program.
-N: No DNS polling (can speed up the operation)
All ports and process services on the current server can be displayed, with grep combined to see a specific port and service situation • •
[[email protected] ~]# NETSTAT-NLP |grep LISTEN//View all current listening ports ·
[[email protected] ~]# NETSTAT-NLP |grep 80//View all 80 port usage ·
[Email protected] ~]# Netstat-an | grep 3306//View all 3306 port usage ·
Some other orders.
Modify configuration file (root path changed to Nginx)
7) Start uninstalling
This is the re-installation of the CentOS system after installing Oneinstack
7)
Ways to open ports:
Method One: Command line mode
1. Open port command:/sbin/iptables-i input-p TCP--dport 8080-j ACCEPT
2. Save:/etc/rc.d/init.d/iptables Save
3. Restart Service:/etc/init.d/iptables restart
4. Check if the port is open:/sbin/iptables-l-N
Method Two: Directly edit the/etc/sysconfig/iptables file
1. Edit the/etc/sysconfig/iptables file: vi/etc/sysconfig/iptables
Add content and Save:-a rh-firewall-1-input-m State--state new-m tcp-p TCP--dport 8080-j ACCEPT
2. Restart Service:/etc/init.d/iptables restart
3. Check if the port is open:/sbin/iptables-l-N
But I use method one has been saved, check the online discovery directly modify the file does not need iptables save, restart under Iptables reload under configuration.
Iptables save is writing the current iptables to/etc/sysconfig/iptables.
I do not save direct restart also not, so the method of two bar
8)
Query port whether there is a process daemon with the following command grep corresponding port, such as 80 for port number
Example: Netstat-nalp|grep 80
9) It seems that the problem appears here
10)
Tell me what you want to do today.
Publish Javawebdemo that do not need to connect to the database
Bad start.
10) Some personal information
Guess what I'm doing? Reload System (CentOS), Reload Service (NGINX,TOMCAT,MYSQL,JDK,)
11)
Opening and closing of ports
11)
See if some of the services are installed
12)
As shown below
Telnet Service
Added a new user
13) ports that are already open
14)
15)
Guess what's down there.
16)
What the hell is wrong with MySQL? Especially the last line, stuck.
17)
This command check the log log.
Recently in the transfer site data, when the database back down, the data blank discovery database is too big, tried phpMyAdmin upload, but the success rate is not high, many data tables are not fully restored, helpless under, can only be imported using the command line.
System Environment CentOS 6.5 64-bit, PHP+MYSQL environment
18)
Backup:
1. go to the bin directory under MySQL, such as:
Cd/usr/local/mysql/bin
2.
Basic Backup./mysqldump-uroot-proot mydb > Backup.sql Note: mydb is the name of the database to be backed up. The user name and password for the database are root; the backup results are saved in the current directory Backup.sql
Restores:
1.SSH login system, log in MySQL data
#mysql-u root-p #注意-P is to log in with a password, the login is MySQL account password # This will prompt for a password, enter to login #mysql> |
2. Select a database
#mysql >use database_name #database_name replaced with the database that needs to be restored |
3. Select Backup. sql file to start importing
#mysql >source/root/backup-20140807.sql #选择备份数据对应路径即可完成 |
4. Data restore results prompt, completed.
If the restore result has an exception, follow the prompts to resolve it.
19)
This is some of the problems with the shopping website.
Generally a permissions issue
Workaround, use the root account to enter the MySQL command line, enter
GRANT Select,Insert,Update,Delete,Create,drop on samp_db.* to [email protected] Identified by ' YourPassword ';
This is the point to be noticed tomorrow.
1)
Publish shopping that need to connect to the database
I'm using maven: (please configure maven locally)
Step1: Package The project into a war package with the command mvn;
Step2: Copy the war packet to the WebApps of Tomcat;
Step3: Start Tomcat/bin/startup.bat (in Windows system, such as server is Linux system, start startup.sh);
STEP4: Access server IP: Port/war package name.
2)
It's actually very simple. You copy the Webroot folder under your MyEclipse to Tomcat on the server you need to deploy. Adjust the port for Tomcat, such as set to 80 so you can access it.
To put it simply, you take your local as a server, and you now put the code you've developed into local tomcat and start the access. Then you are now a server, you are with you on any computer on the local area network, access to the ip+ port + application can be accessed. Then, the rest is the domain name binding you this IP.
You can use Maven
, the space can also be bound to multiple domain names, to the host control Panel to bind other domain names (must be eligible), and then please resolve the domain A record to the space IP address. There is the site domain binding host is not able to bind, your site after the successful filing, contact your virtual hosting provider, have them to bind you.
Second: Tomorrow's plan
1)
Publish and perform unit tests on the project related to the task table, refueling to complete
2)
Execute the main method directly to run through the process on the server.
Three: Encounter problems
Now it's because I don't know a lot about the files that need to be changed.
Four: Thinking Summary
Keeping your mind clear is necessary to solve a problem that has been bothering you for a long time!
Installing the deployment server and Javaweb project