Installation of common ubuntu software and common ubuntu Software
InstallUbuntuRemote graphical interface
Sudo apt-get install xrdp (sudo apt-get install .. command for installing software)
Sudo apt-get install vnc4server tightvncserver
After the installation is complete, run the following command (this command is used because the gnome Desktop is installed. Multiple table managers, unity and GNOME, exist in ubuntu12.04 at the same time. You need to specify one at startup, otherwise, even after the remote login verification is successful, it is only the background and nothing else)
Cd/home/Youruser (youruser?Is the username of each user.)
Echo "gnome-session -- session = ubuntu-2d">. xsession
Sudo/etc/init. d/xrdp restart
Install the deb File
Dpkg-I <package. deb>
1.InstallGitlab
Enter the command line mode of the ubuntu terminal and execute
Sudo apt-get install openssh-server
Sudo apt-get install postfix # sendmail or exim is also OK
Download the package gitlab_7.0.0-omnibus-1_amd64.deb, cd to the package's directory, and execute the following installation command.
Sudo dpkg-I gitlab_7.0.0-omnibus-1_amd64.deb
Run the following statement to enter the configuration file and modify it to your own IP address and port.
Modify the URL in sudo-e/etc/gitlab. rb to http: // 10.20.6: 81.
Initialize the configuration after modification.
Sudo gitlab-ctl reconfigure
Start gitlab
Under the root account, run gitlab-ctl start. View All commands and run gitlab-ctl.
Uninstall gitlab
Gitlab-ctl uninstall
Gitlab-ctl cleanse
Sudo dpkg-r gitlab-ce
Sudo dpkg -- purge gitlab-ce
Sudo apt-get purge remove gitlab.
Enter the modified address in the browser, such as http: // 10.20.6: 81, and the user name and password.
Root
5 iveL! Fe
2.InstallJdk
Decompress tar xvf jdk-7u65-linux-x64.tar.gz
Check whether the java directory exists in the/usr directory under the root user. If the directory does not exist, create the java Directory: mkdir/usr/local/java.
For root users, mv jdk1.7.0 _ 65/usr/local/java
Configure environment variables:
$ Sudo gedit/etc/profile
Add the following content at the end of the file to save and close the file.
# Set java environment
Export JAVA_HOME =/usr/local/java/jdk1.7.0 _ 65
Export JRE_HOME =$ {JAVA_HOME}/jre
Export CLASSPATH =. :$ {JAVA_HOME}/lib :$ {JRE_HOME}/lib
Export PATH =$ {JAVA_HOME}/bin :$ {JRE_HOME}/bin: $ PATH
Use the env command to view the JAVA_HOME Value
$ Env
If JAVA_HOME =/usr/lib/jvm/jdk1.7.0 _ 21, the configuration is successful.
Make the settings take effect: the JDK configuration is complete.
$ Source/etc/profile
To ensure correctness, perform a simple test
$ Java-version
Output:
Java version "1.7.0 _ 65"
Java (TM) SE Runtime Environment (build 1.7.0 _ 65-b17)
Java HotSpot (TM) 64-Bit Server VM (build 24.65-b04, mixed mode)
Installed successfully!
Set the default JDK
Sudo ln-s-f/usr/local/java/jdk1.7.0 _ 65/jre/bin/java
Sudo ln-s-f/usr/local/java/jdk1.7.0 _ 65/bin/javac
Sudo update-alternatives -- install/usr/bin/java/usr/local/java/jdk1.7.0 _ 65/jre/bin/java 300
Sudo update-alternatives -- install/usr/bin/javac/usr/local/java/jdk1.7.0 _ 65/jre/bin/javac 300
Sudo update-alternatives -- install/usr/bin/java/usr/local/java/jdk1.7.0 _ 65/jre/bin/java 300
Sudo update-alternatives -- install/usr/bin/javac/usr/local/java/jdk1.7.0 _ 65/jre/bin/javac 300
Sudo update-alternatives -- config java
Select the serial number and set the default jdk.
3.InstallAnt
Step 1: Download apache-ant
Go to the apache official website to download the required version.
Step 2: Extract
Decompress the downloaded package to the/usr/local/ant/apache-ant-1.9.4 directory.
Step 3: Set Environment Variables
Write the/etc/profile file ANT_HOME =/usr/local/ant/apache-ant-1.9.4 and add:
PATH = $ ANT_HOME/bin: $ PATH
Step 4: take effect
Command: source/etc/profile
Step 5: copy the activemq-all-5.9.0.jar and ant-rulevalidator-3.1.0.jar to apache-ant-1.9.4/lib
Copy build. xml to apache-ant-1.9.4 and apache-ant-1.9.4/bin.
Step 6: Run ant
Ant run to check whether it is successful.
4.InstallActivemq
1. Create a folder activemq
Mkdir/usr/local/activemq
2. Download The activeMQ installation package to/usr/local/activemq
Apache-activemq-5.9.0-bin.tar.gz, http://activemq.apache.org/download.html
3. decompress the file to the running directory/usr/local/activemq.
Tar-xzvf/usr/local/activemq/apache-activemq-5.9.0-bin.tar.gz
4. modify the permissions of the activemq running file under the root user
Cd/usr/local/activemq/apache-activemq-5.9.0/bin
Chmod-r 755 activemq
5. Run
Normal start./activemq start
6. Check that the instance has been started.
ActiveMQ uses port 61616 to provide the JMS service by default, and port 8161 to provide the console service. Run the following command to check whether the ActiveMQ service has been successfully started.
Open Port: nc-lp 61616 &
View which ports are on netstat-anp
Check whether port 61616 is Enabled: netstat-an | grep 61616
Check whether it has been started:
(1). View console output or log files
(2) directly access the activemq Management page: http: // localhost: 8161/admin/
User: admin Password: admin
7. Disable
Press ctrl + c or close the corresponding terminal.
5. InstallationEquinox
1. Copy the equinox folder to/usr/local
2. You need to set the permission chmod-R 755Equinox
3.Set/Configuration/config. ini,UseConfig-liunx.iniReplace the path inConfig. ini
4. start with the root user in/usr/local/equinox,./start. sh
6. Install the website ruleValidator. war
1. You need to install ipvs
6. InstallationTomcat
1. Download apache-tomcat-7.0.40.tar.gz,
Select the Ubuntu, that is, the apache-tomcat-7.0.40.tar.gz file,
2. Copy the installation file to the/usr/local/tomcat directory and enter the command on the console,
Sudo tar-zxvf apache-tomcat-7.0.40.tar.gz
Decompress the installation package to the/usr/local/tomcat directory,
3. Run the following command on the console: sudo gedit/usr/local/tomcat/bin/startup. sh,
Configure the startup. sh file and add the following configuration items,
JAVA_HOME =/usr/local/java/jdk1.7.0 _ 65
PATH = $ JAVA_HOME/bin: $ PATH
CLASSPATH =.: $ JAVA_HOME/lib/dt. jar: $ JAVA_HOME/lib/tools. jar
TOMCAT_HOME =/usr/local/tomcat
The JAVA_HOME and so on are shown in the Sun JDK installation article above.
Save and exit.
4. Go to the/usr/local/tomcat/bin/directory,
Enter the following command:
Cd/usr/local/tomcat/bin,
Sudo./startup. sh
Start the tomcat server,
If:
Using CATALINA_BASE:/usr/local/tomcat
Using CATALINA_HOME:/usr/local/tomcat
Using CATALINA_TMPDIR:/usr/local/tomcat/temp
Using JRE_HOME:/usr/local/tomcat
Using CLASSPATH:/usr/local/tomcat/bin/bootstrap. jar
The code is basically started normally. Enter http: // localhost: 8080/to check whether you can see the familiar tomcat welcome interface.
5. For other configurations, you can configure the conf/server. xml file, such as the port number,
Enter the command: sudo gedit/usr/local/tomcat/conf/server. xml
<Connector port = "80" protocol = "HTTP/1.1"
ConnectionTimeout = "20000"
RedirectPort = "8443" URIEncoding = "UTF-8"/>
Change the listening port to 80 and add URIEncoding = "UTF-8" to support Chinese parameter passing.
The command to stop the shutdown server is:
Sudo./shutdown. sh
7. ubuntuCommand
Manage startup services in Ubuntu
Method 1:
View service list Code
Service -- status-all
Service Code at startup
Sudo update-rc.d-f myservice default
Service Code when the instance is stopped
Sudo update-rc.d-f myservice remove
Method 2:
Installation code
Sudo install sysv-rc-conf
Execute Code
Sudo sysv-rc-conf
Add a service: sudo update-rc.d ServiceName ults
Delete A service: sudo update-rc.d ServiceName remove
8. tomcatSecurity Settings
1. Disable the server port:
Server. xml has the following line by default:
<Server port = "8005" shutdown = "SHUTDOWN">
In this way, anyone can telnet to port 8005 of the server, enter "SHUTDOWN", Press enter, and the server is immediately shut down. From a security perspective, we need to convert the shutdown command into a string that is not easily guessed by others.
For example, modify as follows:
<Server port = "8006" shutdown = "cdmpNC"> in this way, Tomcat can be closed only when telnet to 8006 and "cdmpNC" is entered.
Note: This modification does not affect the execution of shutdown. bat. You can shut down the server by running shutdown. bat.
2. For tomcat3.1, the method for blocking automatic listing of directory files
By default, if you access a web application under tomcat, if you enter a directory name and there is no available welcome file in the directory, tomcat will list all the files in this directory. If you want to block this default behavior, you can modify conf/web. xml file, where: <servlet>
<Servlet-name> default </servlet-name>
<Servlet-class> org. apache. catalina. servlets. DefaultServlet </servlet-class> <init-param>
<Param-name> debug </param-name> <param-value> 0 </param-value> </init-param> <init-param>
<Param-name> listings </param-name> <param-value> true </param-value> </init-param>
<Load-on-startup> 1 </load-on-startup> </servlet>
Changed to: <servlet>
<Servlet-name> default </servlet-name>
<Servlet-class> org. apache. catalina. servlets. DefaultServlet </servlet-class> <init-param>
<Param-name> debug </param-name> <param-value> 0 </param-value> </init-param> <init-param>
<Param-name> listings </param-name>
<Param-value> false </param-value> </init-param>
<Load-on-startup> 1 </load-on-startup> </servlet>
3. Shield administrator users
4. shield the manager Management Interface
5. webpage with running error
If the web page cannot be found, the 404 error will be displayed, and the server configuration will be clear at a glance. To avoid this problem, you need to customize the error page. The settings are as follows:
9Latest InstallationTomcat
Enter the root directory of the currently logged-on user :~
1. decompress the package
Tar-xzf apache-tomcat-7.0.54.tar.gz
Obtain the apache-tomcat-7.0.54 folder.
2. Change the name. Otherwise, it hurts:
Mv apache-tomcat-7.0.54 tomcat
3. Add/usr/local/
Sudo mv tomcat/usr/local/
4. Enter/usr/local/tomcat
Cd/usr/local/tomcat
5. Change users (Security First)
Sudo chown-R root.
Sudo chgrp-R root.
6. Add Environment Variables
Sudo su-
Vi/etc/profile
Add at the bottom:
CATALINA_HOME =/usr/local/tomcat
Export CATALINA_HOME
Save and exit
Refresh variable
Source/etc/profile
7. Enter $ CATALINA_HOME/bin
Cd $ CATALINA_HOME/bin
8. Modify catalina. sh.
Vi catalina. sh, find
# OS specific support. $ var _ must _ be set to either true or false.
Define CATALINA_HOME and JAVA_HOME again in this line:
CATALINA_HOME =/usr/local/tomcat
JAVA_HOME =/usr/local/java/jdk1.7.0 _ 21
CLASSPATH =.: $ JAVA_HOME/lib: $ CATALINA_HOME/lib
Save and exit
9. log out of the root account and try to start tomcat.
Logout
Sudo./bin/startup. sh
If the following is displayed without any exception, the startup is successful:
Using CATALINA_BASE:/usr/local/tomcat
Using CATALINA_HOME:/usr/local/tomcat
Using CATALINA_TMPDIR:/usr/local/tomcat/temp
Using JRE_HOME:/usr/local/java/jdk1.7.0 _ 21
Using CLASSPATH:/usr/local/tomcat/bin/bootstrap. jar:/usr/local/tomcat/bin/tomcat-juli.jar
10. Stop tomcat: sudo./bin/shutdown. sh
10-1. Modify:/usr/local/tomcat/conf/server. xml
Content: <Connector port = "80" redirectPort = "8443" connectionTimeout = "20000" protocol = "HTTP/1.1"/>
11. Install the tomcat service:
Sudo cp bin/catalina. sh/etc/init. d/tomcat
View services:
Sudo service tomcat status
Lists A Bunch Of operation options, indicating that the service is properly installed.
12. start tomcat
Sudo update-rc.d-f tomcat ults
13. Start a service.
Sudo service tomcat start
14. If there is no problem, restart and try again ..