Serposcope is a free and open source search engine rank tracker application. It is built in Java and it is a cross-platform application. With Serposcope you can track any keywords and any websites you want without any limits. As the software tracks all the websites for a keyword, you can retrieve the ranking history of a competitor at any times. It is flexible and searches can be done from a specific city or a country. Provides user account management so that you can create an account with the ability to monitor specific keywords only.
In this tutorial, we will install Serposcope on CentOS 7 server.
Requirements
Serposcope requires at least 1GB of RAM. All the required dependencies will be installed throughout the tutorial. You will need a minimal installation of CentOS 7 with root access on it. If you are logged in as a non-root user, you can run sudo -i
to switch to root user.
Installing Serposcope
Before installing any package it is recommended that you update the packages and repository using the following command.
yum -y update
Serposcope runs on both OpenJDK and Oracle JAVA. In this tutorial, we will install the latest version of Oracle Java into the server. Run the following commands for same.
wget --no-cookies --no-check-certificate --header "Cookie:oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/8u131-b11/d54c1d3a095b4ff2b6607d096fa80163/jdk-8u131-linux-x64.rpm"
If you do not have wget
installed, you can run the yum -y install wget
to install wget. Now install the downloaded RPM using the following command.
yum -y localinstall jdk-8u131-linux-x64.rpm
You can now check the java version using the following command.
java -version
You will get the following output.
[root@liptan-pc ~]# java -version
java version "1.8.0_131"
Java(TM) SE Runtime Environment (build 1.8.0_131-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode)
Now download the Serposcope jar file using the following command.
wget https://serposcope.serphacker.com/download/2.7.1/serposcope-2.7.1.jar
mv serposcope-*.jar serposcope.jar
You can always check for the link to the latest version of Serposcope using Serposcope download page.
To start the application immediately you can run the following command.
java -jar serposcope.jar
But it is recommended to create a systemd service to run Serposcope jar file and create a reverse proxy with Apache or nginx for accessing the application on port 80. Using systemd service will automatically start the application on failures and boot time.
Move the Serposcope jar file to another location using the following command.
mv serposcope.jar /var/serposcope.jar
To create a systemd service, create a new systemd service file using the following command.
nano /etc/systemd/system/serposcope.service
Now add the following lines into the text file.
[Unit]
Description=Serposcope server
After=syslog.target
After=network.target
[Service]
User=root
Type=simple
ExecStart=/bin/java -jar /var/serposcope.jar
Restart=always
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=Serposcope
[Install]
WantedBy=multi-user.target
Save the above text into the Systemd service file. You can now run the Serposcope server directly using the following command.
systemctl start serposcope
To enable the application to start automatically at boot time, run the following command.
systemctl enable serposcope
To check the status of the service, run the following command.
systemctl status serposcope
You will likely see the following output.
[root@liptan-pc ~]# systemctl status serposcope
● serposcope.service - Serposcope server
Loaded: loaded (/etc/systemd/system/serposcope.service; enabled; vendor preset: disabled)
Active: active (running) since Fri 2017-05-19 14:54:14 UTC; 46s ago
Main PID: 9447 (java)
CGroup: /system.slice/serposcope.service
└─9447 /bin/java -jar /var/serposcope.jar
May 19 14:54:15 ip-172-31-1-14 Serposcope[9447]: [2017-05-19 14:54:15,067] [NinjaJetty] INFO c.SerposcopeConf - se...2.7.1
May 19 14:54:15 ip-172-31-1-14 Serposcope[9447]: [2017-05-19 14:54:15,071] [NinjaJetty] INFO c.SerposcopeConf - se...scope
May 19 14:54:15 ip-172-31-1-14 Serposcope[9447]: [2017-05-19 14:54:15,071] [NinjaJetty] INFO c.SerposcopeConf - se.../logs
May 19 14:54:15 ip-172-31-1-14 Serposcope[9447]: [2017-05-19 14:54:15,071] [NinjaJetty] INFO c.SerposcopeConf - se...MySQL
Instead of using the application on Port 7134, you can use nginx to run on port 80 or 443 in the case of using SSL. This way the main application will run on port 7134, and nginx will work as a reverse proxy. Nginx is not available in default YUM repository, hence you will need to install EPEL repository also.
yum -y install epel-release
yum -y update
Install nginx web server the following command.
yum -y install nginx
Now we will need to generate SSL certificates from Let’s Encrypt client. If you can want to use commercial SSL certificates instead, you can purchase SSL certificates from HostPresto.
To install Let’s Encrypt client also called Certbot run the following command.
yum -y install certbot
Once the installation finishes, run the following command to obtain the SSL certificates from Let’s Encrypt. Make sure that your domain is pointed to the server, the Let’s Encrypt will check the domain authority before providing the certificates.
certbot certonly --standalone -d yourdomain.com -d www.yourdomain.com
Once the certificates are generated, they are likely to be stored in the following directory.
/etc/letsencrypt/live/yourdomain.com
Where yourdomain.com
is your actual domain. In the directory, you will find cert.pem
which is your domains certificate and privkey.pem
which is your certificate’s private key.
Let’s Encrypt SSL expires in 90 days, so it is recommended to set an automatic renewal for your certificates. Run the following command to open your crontab file.
crontab -e
Enter the following line into the crontab file.
30 1 * * 1 /usr/bin/certbot renew >> /var/log/le-renew.log
The above cron job will automatically run every Monday at 1:30 AM and if your certificates are due for expiry, it will automatically renew them.
As the SSL certificates are now generated, we can proceed further to configure nginx configuration file. Now create a new server block for nginx configuration file using the following command.
nano /etc/nginx/conf.d/ssl-yourdomain.com.conf
Replace yourdomain.com
with your actual domain. Now copy and paste the following lines into the file.
server {
listen 80;
return 301 https://$host$request_uri;
}
server {
listen 443 http2 ssl;
server_name yourdomain.com www.yourdomain.com;
ssl_certificate /etc/letsencrypt/live/yourdomain.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/yourdomain.com/privkey.pem;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
ssl_ciphers "EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH";
ssl_ecdh_curve secp384r1;
ssl_session_cache shared:SSL:10m;
ssl_session_tickets off;
ssl_stapling on;
ssl_stapling_verify on;
resolver 8.8.8.8 8.8.4.4 valid=300s;
resolver_timeout 5s;
add_header Strict-Transport-Security "max-age=63072000; includeSubdomains";
add_header X-Frame-Options DENY;
add_header X-Content-Type-Options nosniff;
location / {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://localhost:7134;
proxy_read_timeout 90;
proxy_redirect http://localhost:7134 https://yourdomain.com;
}
}
In the above configuration change yourdomain.com
to your actual domain. Also, make sure that the path to your SSL certificate and private key are correct.Now start nginx web server and enable it to automatically start at boot time using the following commands.
systemctl start nginx
systemctl enable nginx
Now you will need to disable your SELinux because Proxy configuration does not work with SELinux policies. To temporary disable SELinux without restarting the server, run the following command.
setenforce 0
To completely disable the SELinux you will need to edit /etc/selinux/config
file.
nano /etc/selinux/config
Find the following line:
SELINUX=enforcing
Change it to:
SELINUX=disabled
Now you will need to reboot your server so that the new configuration can take effect. Now you can start the Jekyll service if not started already using the following command.
systemctl start serposcope
You can now browse the following URL in your favorite browser.
https://yourdomain.com
You will see the following screen, which will ask you to create an administrator account.
HP_NO_IMG/data/uploads/users/5bc5f3e0-17df-4257-afd4-59fc57ecae4e/408805768.png” alt=”” />
Provide your email address and password twice, and click on Create button. Once the account is created, you will be taken to login interface, login using same credentials, and you will see the following dashboard.
HP_NO_IMG/data/uploads/users/5bc5f3e0-17df-4257-afd4-59fc57ecae4e/1899590278.png” alt=”” />
Conclusion
In this tutorial, we installed Serposcope on CentOS 7. You can now successfully use the application to track website rank and monitor website ranking in Google to improve SEO of your websites.