Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - darkness

Pages: 1 ... 5 6 [7] 8 9 ... 14
91
CentOS 7 Problems / Re: Can`t install CentOS7
« on: September 19, 2017, 05:13:05 AM »
Everything went ok on the installation. Than I fixed the grub config. When it was booting on the 3 color lines the last one(white one) get to the end and get stucked for more than an 35minutes. I will try again soon, but for the moment I stick on CentOS 6. :D

92
SSL / Certbot installation and requesting certificate (CentOS 7)
« on: September 16, 2017, 05:08:25 AM »
Hello people,
As I`m having customers asking for Dedicated servers and some of them request different OS than CentOS I had to do it. The last customer asked for Ubuntu 16.04 LTS to run some game server and he get it. When he asked for help to install ssl on his page I got confused. I searched a bit on the internet and I found certbot which I found for very easy to use and the strange part - it gave me a green bar certificate. Let`s see the installation:
-> Installing the EPEL repo
Code: [Select]
yum -y install epel-release-> Installing Certbot
Code: [Select]
yum -y install python-certbot-apache-> Checking if Apache is running
Code: [Select]
systemctl status httpdIf Apache is not running use the following command to start it:
Code: [Select]
systemctl start httpdor
Code: [Select]
service httpd startIf Apache is running just skip the above commands.
-> Check if your site is reachable using cURL:
Code: [Select]
curl your-site.com-> Request a certificate:
Code: [Select]
certbot --apache -d your-site.comor
Code: [Select]
certbot --apache -d your-site.com -d mail.your-site.com -d www.your-site.com -d ftp.your-site.com -d ....Note that certbot will check if your-site.com/mail.your-site.com and others have A record in the DNS server. If they don`t - will give an error. If everything is ok you will have to answer few simple questions like a recovery email if you lost your cert and should it always redirect to https than http and you`re done. Certbot is requesting certificatest from Let's Encrypt.
-> Check if you SSL is working
Code: [Select]
https://www.ssllabs.com/ssltest/analyze.html?d=your-site.com&latest-> Try to renew your SSL cert to see if it`s working
Code: [Select]
certbot renewIf you get output similar to this you are ok:
Code: [Select]
Saving debug log to /var/log/letsencrypt/letsencrypt.log

-------------------------------------------------------------------------------
Processing /etc/letsencrypt/renewal/example.com.conf
-------------------------------------------------------------------------------
Cert not yet due for renewal

The following certs are not due for renewal yet:
  /etc/letsencrypt/live/example.com/fullchain.pem (skipped)
No renewals were attempted.
-> Adding Certbot Renew to crontab
Code: [Select]
crontab -e-> Every 30 days 2h .... renew
Code: [Select]
30 2 * * * /usr/bin/certbot renew >> /var/log/le-renew.logClose and save the crontab. You are done. Have fun with your new SSL certificate.

93
CentOS 7 Problems / Re: Can`t install CentOS7
« on: September 16, 2017, 04:29:17 AM »
Thanks for the info. I will try it as soon as possible. I hope it`s going to work.

94
CentOS 7 Problems / Can`t install CentOS7
« on: September 11, 2017, 03:26:10 PM »
Hi people,
I have one old rig HP ProLiant DL380 G5 with 2xQuad Core Xeon @ 3.00GHz, HP Smart Array P400, 32GB DDR2 ECC RAM, 2x73GB SAS 15k RPM + 6x500GB SATA III, 2xGigabit LAN + 2x1000W PSU. Today I tried to install CentOS 7 on it and guess what - it didn`t see my hard drives. None of them. I was reading on centos.org that they support P400 iscsi drivers, but not on the installer. I switched off the RAID Controler - the same, still no HDDs. How I`m supposed to install CentOS 7 when it doesn`t see my hard drives? and later to install the drivers for them? WTF? More strange thing is that on CentOS6 Minimal install it see all my hard drives with RAID 1+0 on. For me it`s strange that old version of RHEL based Linux supports SCSI/SAS/SATA and the new version doesn`t. If anybody have an idea how to install CentOS7 on SAS/SATA HDD please tell me.

95
New Modules / Re: Real User Used Quota
« on: August 26, 2017, 04:30:01 AM »
Hello,
First of all - Great job.
Sorry but I never used github for something different than "git clone ..." and I have no idea how to make a "Pull request" so I will put it here. As I have my own users on the shell and for them I have created an Unlimited (Quota) package I noticed a small error. If the package is Unlimited the quota is 0 (zero) and I saw "Division by zero ... bla bla bla". I made a small fix which you might like:
Code: [Select]
<?php
                    $usedQuotaPercent 
null; <- Added for no warnings
                    $usedQuotaProgress 
null; <- Added for no warnings
                    $packageMaxQuotaBytes 
$result[$i]['disk_quota'] * 1024 1024;
                    if (
$packageMaxQuotaBytes == "0") { <- Added for "Division by zero" error
                        
echo "Unlimited";
                    } else {
                    
$usedQuotaPercent round($allQuota 100 $packageMaxQuotaBytes2);
                    
$usedQuotaProgress round($allQuota 100 $packageMaxQuotaBytes0);
                    }
                    echo 
"[$usedQuotaPercent %]";
                    
$progressBarClass 'progressBarGreen';
                    if (
$usedQuotaProgress 50) {
                        
$progressBarClass 'progressBarOrange';
                    }
                    if (
$usedQuotaProgress 90) {
                        
$progressBarClass 'progressBarRed';
                    }
                    
?>

Like this for users with package "Unlimited" you see "Unlimited [%]" and always a full green bar. For the other users with different packages you see "[3.01%]" and green bar (for example). Something like this:

Hope you like it.

96
Scripts / Re: Script or api to create user
« on: August 23, 2017, 05:43:53 AM »
Quote
ixus
Just use in the shell cURL to execute IP:2030/api/?key=KEY&api=account_new&domain=DOMAIN&username=USERNAME&password=PASSWORD&package=PACKAGE-NUMBER&email=CLIENT-EMAIL&inode=10000&nofile=100&nproc=25

97
I can build it / Re: Boxbilling Integration
« on: August 21, 2017, 10:49:30 AM »
Oh, no. I tried with the password that I wrote on the registration. My Bad.

98
I can build it / Re: Boxbilling Integration
« on: August 21, 2017, 04:44:23 AM »
Again a big BRAVO to you. Good work. Just a note: after registering my account and ordering the hosting I couldn`t login to CWP until I changed the password. Anyway great job. Waiting for you to publish the price of the module and the webpage for it.

99
The way I see it:
1. When the client login it`s possible not to add a domain.
2. If they don`t add a domain they will open their web page on http://server-domain.tld/~user/public_html/
3. Opening http://server-domain.tld/~user/public_html/ is a security risk for the client`s files and for the server.
Have fun and continue adding username.server-domain.tld as a domain for new clients.

100
Check your apache configuration and see where domain.com and www.domain.com are pointing. If they point to a different place edit the directory of domain.com to be the same as for www.domain.com. Save. Restart apache.

101
Apache / Re: creating new files causes 500 error
« on: August 20, 2017, 04:35:31 AM »
With what user you are logging through WinSCP? If you are logging in with root and creating files in /home/john/public_html/ you will always get the 500 error and you will always need to "Fix Permissions".

102
I can build it / Re: OpenVZ with CWP
« on: August 18, 2017, 06:17:43 PM »
I saw that from OpenVZ.org made updates to the templates. Now I`m testing the new templates to be sure they are not for Virtuozzo 7 only and they work on OpenVZ 6 also. For the moment what I see is that all the CentOS 6 versions works ok, and they are upgraded to 6.9 (Final) so when you install a container with CentOS 6, the user don`t need to wait 1h for "yum -y update", but most likely 1-15min depending on your INet connection and your server.
By the way all(2) Gentoo templates will be removed. They are old, no support for them, too much work to fix the networking and ... it sux. ;D
I found a Proxmox release of Gentoo 03/05/2017, but it makes problem with extracting stage3 to the container so it will be dismissed also.
Also got Ubuntu 17.04 - networking problem, OpenSuSE 42.2 - install problem. Got to test Alpine Linux 3.3, 3.4 and 3.5, Arch Linux base from 2017 and if they work will be added to the module.
Stay tuned.

103
CentOS Configuration / IPv6 on CentOS 6 with autostart on boot
« on: August 16, 2017, 07:50:28 PM »
Hello people,
Here I`m going to give you a how to make an IPv6 Configuration for your CentOS 6 with an auto start script.
First of all you will need an account in TunnelBroker.net. Once you make an account and login to it, go to Create Regular Tunnel. On the first line write down the public IP address of your CentOS 6 machine. On Available Tunnel Servers:
Code: [Select]
ping -c 5 <tunnel server IP> one by one and find the best one for you and select it. Than press Create tunnel. Go back on the Main Page and select your tunnel. Copy the IPv6 address from Client IPv6 Address:
Go to /etc/init.d/ and run
Code: [Select]
nano -w ipv6.
Paste inside this code and replace with your Client IPv6 Address:

Code: [Select]
#!/bin/bash

start(){
        echo "Starting ipv6 ..."
        ifconfig sit0 up
        ifconfig sit0 inet6 tunnel ::216.66.87.14
        ifconfig sit1 up
        ifconfig sit1 inet6 add Client IPv6 Address::2/64
        ifconfig sit1 inet6 add Client IPv6 Address::3/64
        ifconfig sit1 inet6 add Client IPv6 Address::4/64
        ifconfig sit1 inet6 add Client IPv6 Address::5/64
        route -A inet6 add ::/0 dev sit1
}

stop(){
        echo "Stopping ipv6 ..."
        ifconfig sit0 down
        ifconfig sit1 down
}

restart(){
        echo "Restarting ipv6 ..."
        stop
        sleep 5
        stop
        sleep 5
        start
}
case "$1" in
  start)
        start
        ;;
  stop)
        stop
        ;;
  restart)
        restart
        ;;
  *)
        echo "Usage: ipv6 {start|stop|restart}"
        exit 1
esac

exit 0

You can continue adding IPv6 addresses after ifconfig sit1 inet6 add Client IPv6 Address::5/64 as much as you want until you follow the rules for the IPv6.
Example of the Client IPv6 Address:
Code: [Select]
2001:470:1d1c:28ed::2/64Close your file with Ctrl+X and press Y to save it.
Execute the following commands:
Code: [Select]
chmod 755 ipv6          --> Change the permissions of the file to be executable
chkconfig ipv6 on        --> Adding the file to system start
service ipv6 start        --> Starting the IPv6 on your system
ping6 -c5 ipv6.google.com     --> Test your IPv6 configuration
When you reboot your system or it get rebooted by any reason the script will start alone and you don`t need to add everything by hand one by one. I wrote this script for me because I got angry after every reboot of the developing machine to add every time the IPv6 stuff again and again.
You don`t need to reboot your server to start the IPv6.
One more thing:
Login with root to your CWP6.admin panel, go to Services Config, Services Monitor and select the ipv6 to be watched for stopping. Click save and you`re done. Have fun with your new IPv6.
(Don`t be greedy to take /64 and /48 unless you finish the IPs from /64 which is close to unbelievable. In /64 you have 18,446,744,073,709,551,616 IP addresses, so unless you`re the ISP which is giving 2,635,249,153 IPs per customer (and you have all 7,000,000,000 people on the earth as customers) you are not able to finish the /64).  ;D That`s it. Have fun.

104
I can build it / Re: OpenVZ with CWP
« on: August 16, 2017, 03:47:22 PM »
After few shorts on the electricity because of burning houses here in the village, the HDD of the developing machine burn out. It`s good that I have 3 backups on 3 different places around Europe. Today I bought a new HDD. Now I will install CentOS 6 again and I will continue work.
Stay tuned ...

105
Apache / Re: domain.com to www.domain.com
« on: August 14, 2017, 04:37:48 AM »
Hi,
I`ve never used OVH, but you should change the "DocumentRoot" in OVH for domain.com to point on the same place where www.domain.com is pointing and you should be ok. Try and let me know.

Pages: 1 ... 5 6 [7] 8 9 ... 14