CentOS 7 self-built encrypted chat environment Openfire XMPP Service
0. References:
Https://xmpp.org/software/clients.html
Http://aqq.eu/
Http://www.igniterealtime.org/projects/openfire/
1. First, prepare your own server and install the CentOS7 operating system. If it is your own server, you need to install the operating system on your own.
In CentOS 7, the graphic interface was started. centos6.7 was previously installed on the virtual machine, and the switching method was to directly modify it in/etc/inintab,
However, if you change to 7, this method is no longer used.
Open the configuration file in the command line and query the following content.
Vi/etc/inittab
Multi-user.target: analogous to runlevel 3 # Command Line Mode
Graphical.tar get: analogous to runlevel 5 # graphic mode
Run the systemctl get-default command to obtain the current mode. If the result is Multi user.tar get, the current mode is the command line mode.
Settings:
Systemctl set-default graphical.tar get
Restart the computer to check whether the installation is successful. If the installation is unsuccessful, it means that the GUI is not installed during the installation process. You need to reinstall the corresponding package or reinstall the operating system.
If the English language is not good, check the License information after startup:
After CentOS7 is installed, it is displayed as follows:
Initial setup of CentOS Linux 7 (core)
1) [x] Creat user 2) [!] License information
(No user will be created) (license not accepted)
Please make your choice from above ['q' to quit | 'C' to continue | 'R' to refresh]:
Solution:
Enter "1" and press Enter
Enter "2" and press Enter
Enter "q" and press Enter.
Enter "yes" and press Enter.
2. CentOS 7 64 broadband speed test to verify whether our bandwidth is normal.
$ Wget https://raw.github.com/sivel/speedtest-cli/master/speedtest_cli.py
$ Chmod a + rx speedtest_cli.py
$ Sudo mv speedtest_cli.py/usr/local/bin/speedtest-cli
$ Sudo chown root: root/usr/local/bin/speedtest-cli
3. Install the Openfire server environment
Download the latest server package from the official website.
Openfire-4.0.2-1.i386.rpm
Run the following command on the server:
Wget http://www.igniterealtime.org/downloads/download-landing.jsp? File = openfire/openfire-4.0.2-1.i386.rpm
Then execute the command to install:
Rpm-ivh openfire-4.0.2-1.i386.rpm
The system is installed in the/opt/openfire directory by default.
Switch to the program directory on the server and run openfire. sh to start the program test!
If the following error is found, it indicates that the Glibc related content is not properly installed. In this case, we need to find the corresponding package in our installation disc.
[Root @ localhost bin] #./openfire. sh
./Openfire. sh:/opt/openfire/jre/bin/java:/lib/ld-linux.so.2: bad ELF interpreter: No file or directory
./Openfire. sh: Line 178:/opt/openfire/jre/bin/java: Successful
Install the following installation packages. After installation, you can start the service properly.
[Root @ localhost ~] # Rpm-qa | grep glibc
Glibc-headers-2.17-106.el7_2.8.x86_64
Glibc-common-2.17-106.el7_2.8.x86_64
Glibc-2.17-106.el7_2.8.x86_64
Glibc-2.17-106.el7_2.8.i686
Glibc-devel-2.17-106.el7_2.8.x86_64
4. Start the system. By default, after the Openfire service is installed, the system is started. restart the system.
# Chkconfig openfire on
# Chkconfig -- list openfire
Openfire 0: Disable 1: Disable 2: Enable 3: Enable 4: Enable 5: Enable 6: Disable
5. open port 9090 of the firewall (used on the Web Management Interface) and enable port 5222 of the client.
Systemctl status firewalld view status
Firewall-cmd -- permanent -- add-service = http open Http access
Firewall-cmd -- permanent -- add-port = 9090/tcp Open Web Access
Firewall-cmd -- permanent -- add-port = 5222/tcp open Client Connection
Firewall-cmd -- reload
Systemctl start firewalld start
Systemctl enable firewalld boot
Systemctl disable firewalld cancel startup
6. Open your browser and enter http: // [public or private ip address]: 9090/to go to the configuration page.
Configure according to instructions!
7. Just find a client and enjoy it!