• Announcements

    • MannDude

      Current state of vpsBoard   02/04/2017

      Dear vpsBoard members and guests:

      Over the last year or two vpsBoard activity and traffic has dwindled. I have had a change of career and interests, and as such am no longer an active member of the web hosting industry.

      Due to time constraints and new interests I no longer wish to continue to maintain vpsBoard. The web site will remain only as an archive to preserve and showcase some of the great material, guides, and industry news that has been generated by members, some of which I remain in contact to this very day and now regard as personal friends.

      I want to thank all of our members who helped make vpsBoard the fastest growing industry forum. In it's prime it was an active and ripe source of activity, news, guides and just general off-topic banter and fun.

      I wish all members and guests the very best, whether it be with your business or your personal projects.

      -MannDude

Search the Community

Showing results for tags 'centos'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • vpsBoard
    • Announcements & Contests
    • Industry News
  • Virtual Private Servers
    • General Talk
    • Operating a VPS Business
    • Tutorials and Guides
    • Questions and Answers
  • The Lounge
    • The Pub (Off topic discussion)
    • Coding, Scripting & Programming
    • SBC, ARM, Home Automation
  • Marketplace & Reviews
    • Reviews
    • VPS Offers
    • Other Offers
    • Service Requests

Found 15 results

  1. [HELP] Curl not working

    i have in stalled wordpress on centos 6.5 (64bit) and when i change permalink settings and click on any post it shows me an error page, i have updated .htaccess file and curl is enabled on my vps but still cant igure out what is the actual problem. its a fresh installation please someone help me to solve this issue.
  2. Unmanaged VPS

    hello vpsboard can you help me about my problem regarding my VPS ? I have a 1gb ram KVM VPS and the OS I have installed is a centOS 6.5 32bit . I want to access my VPS and browse internet using it what things do I need to install to have a desktop view on my VPS ?
  3. I know CentOS is the OS of choice for many web hosts and I assume some of them use it otherwise day to day. CentOS has released a new version with ARM support: Source: http://news.softpedia.com/news/centos-7-linux-officially-released-for-raspberry-pi-2-banana-pi-and-cubietruck-497891.shtml
  4. Figured this thread could be a handy resource for everyone at all skill-levels. Sometimes you just want to copy and paste a command you've used a hundred times (DD-tests, for example) or are just having a brain fart and forgot how to do something. Well... this thread is for you, my friend! Let's get started! I'm just going to start off with the absolute basics, was planning I'd do several of these and then add more to this post as people respond with additional ones. By the way, the outputs of the commands I show I've done on my Raspberry Pi running Debian on my local network. General Commands > The Basics > All Distributions Uptime Command: uptime Shows the uptime of a VPS, output example below: [email protected]:~# uptime 16:11:59 up 12 days, 8:10, 1 user, load average: 0.08, 0.03, 0.05 Free memory Command free -m Shows the available free memory on your Linux system. Read here for more: http://www.linuxatemyram.com/ [email protected]:~# free -m total used free shared buffers cached Mem: 438 379 58 0 49 213 -/+ buffers/cache: 117 321 Swap: 0 0 0 Processes and resources used command: top Realtime process and resource usage. You can see your load average, uptime, and processes that are consuming system resources. To exit 'top', just hit 'Q'. You can CTRL + M to sort the processes according to their memory usage from highest to lowest, which can come in handy in figuring out what is using up your RAM. (Thanks [member=wcypierre] for that tip) [email protected]:~# top top - 16:16:59 up 12 days, 8:15, 1 user, load average: 0.00, 0.01, 0.05 Tasks: 65 total, 1 running, 64 sleeping, 0 stopped, 0 zombie %Cpu(s): 0.7 us, 0.7 sy, 0.0 ni, 98.7 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st KiB Mem: 448776 total, 389568 used, 59208 free, 50916 buffers KiB Swap: 0 total, 0 used, 0 free, 218484 cached PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 17744 root 20 0 3112 1304 924 R 1.0 0.3 0:00.27 top 2081 mysql 20 0 294m 47m 5320 S 0.3 10.8 75:16.16 mysqld 1 root 20 0 2100 676 576 S 0.0 0.2 0:37.37 init 2 root 20 0 0 0 0 S 0.0 0.0 0:00.10 kthreadd 3 root 20 0 0 0 0 S 0.0 0.0 0:07.65 ksoftirqd/0 4 root 20 0 0 0 0 S 0.0 0.0 0:00.01 kworker/0:0 5 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kworker/0:0H 6 root 20 0 0 0 0 S 0.0 0.0 2:02.08 kworker/u:0 7 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kworker/u:0H 8 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 khelper 9 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kdevtmpfs 10 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 netns 12 root 20 0 0 0 0 S 0.0 0.0 0:00.25 bdi-default 13 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kblockd 14 root 20 0 0 0 0 S 0.0 0.0 0:00.22 khubd 15 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 rpciod 16 root 20 0 0 0 0 S 0.0 0.0 0:00.66 khungtaskd 17 root 20 0 0 0 0 S 0.0 0.0 0:08.23 kswapd0 18 root 20 0 0 0 0 S 0.0 0.0 0:00.00 fsnotify_mark 19 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 nfsiod 20 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 crypto 27 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kthrotld 28 root 1 -19 0 0 0 S 0.0 0.0 0:00.00 VCHIQ-0 29 root 1 -19 0 0 0 S 0.0 0.0 0:00.00 VCHIQr-0 30 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 VCHIQs-0 31 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 iscsi_eh 32 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 dwc_otg 33 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 DWC Notificatio 35 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 deferwq 36 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kworker/u:2 37 root 20 0 0 0 0 S 0.0 0.0 6:29.95 mmcqd/0 38 root 0 -20 0 0 0 S 0.0 0.0 0:04.70 kworker/0:1H 39 root 20 0 0 0 0 S 0.0 0.0 0:22.44 jbd2/mmcblk0p2- 40 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 ext4-dio-unwrit 153 root 20 0 2744 980 608 S 0.0 0.2 0:00.32 udevd 235 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 bcm2708_spi.0 1371 root 20 0 4852 2280 568 S 0.0 0.5 0:00.23 dhclient 1574 root 20 0 28060 1576 1064 S 0.0 0.4 0:03.93 rsyslogd 1609 root 20 0 2248 844 672 S 0.0 0.2 0:05.02 cron 1717 root 20 0 1712 556 460 S 0.0 0.1 0:00.13 mysqld_safe 1899 root 20 0 6168 1040 620 S 0.0 0.2 0:00.12 sshd 2082 root 20 0 1804 608 532 S 0.0 0.1 0:00.01 logger 2174 root 20 0 2200 708 588 S 0.0 0.2 0:00.01 getty 2175 root 20 0 2200 708 588 S 0.0 0.2 0:00.01 getty 2176 root 20 0 2200 708 588 S 0.0 0.2 0:00.01 getty 2177 root 20 0 2200 708 588 S 0.0 0.2 0:00.01 getty 2178 root 20 0 2200 708 588 S 0.0 0.2 0:00.01 getty 2179 root 20 0 2200 708 588 S 0.0 0.2 0:00.01 getty 2804 root 20 0 36296 3520 1252 S 0.0 0.8 1:40.49 php5-fpm Check disk space used and available command: df -h This will check available space on your filesystem. Your output will likely look different depending on the configuration of your server. [email protected]:~# df -h Filesystem Size Used Avail Use% Mounted on rootfs 7.3G 3.7G 3.6G 51% / /dev/root 7.3G 3.7G 3.6G 51% / devtmpfs 212M 0 212M 0% /dev tmpfs 44M 196K 44M 1% /run tmpfs 5.0M 0 5.0M 0% /run/lock tmpfs 88M 0 88M 0% /run/shm Change Directory Command: cd /path/to/directory This will change the location of the directory your browsing. In the example above, simply change the path to the directory in which you need to change to. For example, if you needed to move to '/var/www', you would type 'cd /var/www' [email protected]:~# cd /var/www [email protected]:/var/www# List directory content command: ls Now that you've moved to the directory of your choice, you may want to get a list of the content from within that directory. Simply enter the 'ls' command. You should see something like: [email protected]:/var/www# ls bill_murray.jpg check.php damncat.jpg index.php logo.png logs phpinfo.php phpmyadmin test vpsboard Make Directory command: mkdir ./mynewdirectory The command above will create the directory 'mynewdirectory' in whatever directory you are currently in. Maybe you want to go deeper than that, so use the following the command: mkdir -p ./mynewdirectory/test/testing The command above not only creates the directory but also all that follows it. Move a file command: mv test.txt ./testdirectory The above command will the file 'test.txt' to the directory 'testdirectory'. Pretty straight forward. Change password command: passwd This will change the password for the user you are logged in as. For example, if you are logged in as the root password it's very good practice to change your password immediately. You will be prompted to type in your password, and asked to retype it. Your password will not show in the screen. Output will be similar to below: [email protected]:~# passwd Enter new UNIX password: Retype new UNIX password: passwd: password updated successfully Check the CPU information command: cat /proc/cpuinfo This command will tell you information about the CPU your provider uses for the VPS node you are on. Thank you for submitting this one. [email protected]:~$ cat /proc/cpuinfo processor : 0 vendor_id : GenuineIntel cpu family : 6 model : 42 model name : Intel(R) Xeon(R) CPU E31230 @ 3.20GHz stepping : 7 cpu MHz : 3192.748 cache size : 4096 KB fdiv_bug : no hlt_bug : no f00f_bug : no coma_bug : no fpu : yes fpu_exception : yes cpuid level : 13 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss syscall nx rdtscp lm constant_tsc up arch_perfmon pni pclmulqdq ssse3 cx16 sse4_1 sse4_2 x2apic popcnt aes xsave avx hypervisor lahf_lm bogomips : 6385.49 clflush size : 64 cache_alignment : 64 address sizes : 40 bits physical, 48 bits virtual Check memory information command: cat /proc/meminfo Likely not as used as often as the check CPU info command above, but can come in handy. Thank you for submitting this one. [email protected]:~$ cat /proc/meminfo MemTotal: 254828 kB MemFree: 9012 kB Buffers: 45764 kB Cached: 140528 kB SwapCached: 1036 kB Active: 139832 kB Inactive: 88016 kB Active(anon): 19448 kB Inactive(anon): 22164 kB Active(file): 120384 kB Inactive(file): 65852 kB Unevictable: 0 kB Mlocked: 0 kB HighTotal: 0 kB HighFree: 0 kB LowTotal: 254828 kB LowFree: 9012 kB SwapTotal: 496632 kB SwapFree: 490712 kB Dirty: 216 kB Writeback: 0 kB AnonPages: 40804 kB Mapped: 11764 kB Shmem: 56 kB Slab: 12616 kB SReclaimable: 8924 kB SUnreclaim: 3692 kB KernelStack: 640 kB PageTables: 700 kB NFS_Unstable: 0 kB Bounce: 0 kB WritebackTmp: 0 kB CommitLimit: 624044 kB Committed_AS: 229688 kB VmallocTotal: 765952 kB VmallocUsed: 5628 kB VmallocChunk: 752772 kB HardwareCorrupted: 0 kB HugePages_Total: 0 HugePages_Free: 0 HugePages_Rsvd: 0 HugePages_Surp: 0 Hugepagesize: 4096 kB DirectMap4k: 12280 kB DirectMap4M: 249856 kB Stop/Start/Restart (most) services: service [service name] [stop/start/restart/reload/status] OR /etc/init.d/[service name] [stop/start/restart/reload/status] The examples below will use both methods to start/stop/status Nginx and MySQL as it's what is running on my Raspberry Pi right now. [email protected]:~# service nginx restart Restarting nginx: nginx. [email protected]:~# service nginx status [ ok ] nginx is running. [email protected]:~# /etc/init.d/nginx stop Stopping nginx: nginx. [email protected]:~# /etc/init.d/nginx start Starting nginx: nginx. [email protected]:~# /etc/init.d/mysql status [info] /usr/bin/mysqladmin Ver 8.42 Distrib 5.5.31, for debian-linux-gnu on armv7l Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Server version 5.5.31-0+wheezy1 Protocol version 10 Connection Localhost via UNIX socket UNIX socket /var/run/mysqld/mysqld.sock Uptime: 12 days 16 hours 14 min 34 sec Threads: 1 Questions: 24062 Slow queries: 0 Opens: 1532 Flush tables: 1 Open tables: 293 Queries per second avg: 0.021. Thanks [member=wcypierre] for sharing. Change File Permissions command: chmod 755 file-or-directory Need to change the file or folder permissions? Do it quickly via SSH! The example below shows me simply changing the permissions of the directory 'testdir' to 755. Thanks [member=wcypierre] for sharing. [email protected]:/var/www# chmod 755 testdir [email protected]:/var/www# Please contribute to this thread! If you wish to contribute, I'll add your responses to this original posting so all commands are in one post for easy retrieval and use. I'll link to your profile or response to give credit where it is due.
  5. Since a few members here are using my Centmin Mod LEMP web stack for their servers, just a heads up I just switched my centminmod.com domain's DNS over to the new server cluster which sports the new centminmod.com web site design. Also Centmin Mod 1.2.3-eva2000.08 stable release is here - well official release date is July 31st, 2015 which would be about right once DNS updates worldwide. This new release has been in development for past 12+ months, so I am glad to have it released now. You can check outs what's new here or on the new site if DNS has propagated in your neck of the woods. For folks who don't like reading, the quickest way to install Centmin Mod is now via one liner command curl -sL http://centminmod.com/installer.sh | bashHowever, there's other methods outlined here as well Download New method of adding Nginx domain via command line too via /usr/bin/nv as outlined here Nginx Vhost & NSD DNS Setup To create a new site domain Nginx vhost account for newdomain.com with self-signed SSL enabled and Pure-FTPD virtual FTP username = MYFTPUSERNAME, type the following in SSH command line. /usr/bin/nv -d newdomain.com -s y -u MYFTPUSERNAMESo essentially to install Centmin Mod LEMP and setup newdomain.com in Nginx vhost, you only need 2 commands in SSH as root user on a fresh CentOS 6 or 7 based OS server. curl -sL http://centminmod.com/installer.sh | bash /usr/bin/nv -d newdomain.com -s y -u MYFTPUSERNAME or one line when you combine them :) curl -sL http://centminmod.com/installer.sh | bash; /usr/bin/nv -d newdomain.com -s y -u MYFTPUSERNAME Then bookmark and read the Getting Started Guide :D
  6. I mainly use Android devices so had setup my own local Brisbane & Sydney and US based CentOS OpenVPN VPN VPS servers to connect to. However, I'm wanting to extend VPN coverage to Windows 8.1 phone devices too and they prefer L2TP. So I've setup a CentOS 7 server (running Centmin Mod of course) with L2TP Ipsec and it works okay with Android 4.2 and 5.x devices via native VPN features. But there's no auto reconnect features with native Android VPN as opposed to the OpenVPN client I was using. So my question to folks here using L2TP IPSec for Android and Windows 8.1 phone, what VPN clients are you using which support auto reconnect and saving multiple VPN server profiles ? cheers George
  7. About time I posted a quick guide for installing Centmin Mod so here it is :) Centmin Mod v1.2.3 background info http://centminmod.com/centminmod_v123.html Requirements: Fresh CentOS 6.x based 32bit or 64bit installation (CentOS minimal ISO recommended) Minimum 256MB memory available. With some tweaks outlined here, you can install on 128MB memory based VPS. But recommend at least 256MB memory. 25 - 60 minutes of your time depending on speed of your server, network speed (for downloads/yum etc). Links: Install instructions http://centminmod.com/download.html FAQ http://centminmod.com/faq.html Change Log http://centminmod.com/changelog.html General Notes: For Xen 32bit OS users on 64bit host nodes, please read FAQ note regarding ARCH_OVERRIDE value you need to enable for Centmin Mod or Original Centmin script to work. If your SSH2 Telnet client options allow for it you can increase the size of your scroll back buffer size to allow larger amounts of outputted text to be shown via scrolling back and forth. Install: Download to any directory EXCEPT /tmp as scripts won't be executable from /tmp yum -y install bc wget http://centminmod.com/download/centmin-v1.2.3-eva2000.03.zip unzip centmin-v1.2.3-eva2000.03.zip cd centmin-v1.2.3mod chmod +x centmin.sh ./centmin.sh then hit menu option #1 -------------------------------------------------------- Centmin Mod 1.2.3-eva2000.03 - http://centminmod.com -------------------------------------------------------- Centmin Mod Menu -------------------------------------------------------- 1). Centmin Install 2). Add Nginx vhost domain 3). NSD setup domain name DNS 4). Nginx Upgrade / Downgrade 5). PHP Upgrade / Downgrade 6). XCache Re-install 7). APC Cache Re-install 8). XCache Install 9). APC Cache Install 10). Memcached Server Re-install 11). MariaDB 5.2.x Branch Upgrade Only 12). MariaDB 5.2.x to MariaDB 5.5 YUM upgrade 13). Install ioping.sh vbtechsupport.com/1239/ 14). SELinux disable 15). Install/Re-install imagick PHP Extension 16). Change SSHD Port Number 17). Multi-thread compression: pigz,pbzip2,lbzip2,p7zip etc 18). Suhosin PHP Extension install 19). Install FFMPEG and FFMPEG PHP Extension 20). NSD Re-install 21). Exit -------------------------------------------------------- Enter option [ 1 - 21 ] -------------------------------------------------------- The depending on your site setup: Enable Nginx PageSpeed ngx_pagespeed module http://centminmod.com/nginx_ngx_pagespeed.html :) Follow rest of steps at http://centminmod.com/getstarted.html
  8. Never dealt with sms text on linux servers, but was wondering if there's any service/software that would allow VPS/dedicated server to receive a specific SMS text message and then based on that SMS text message run a certain action/task ? Or anything close ? cheers George
  9. Hey everyone. Long story short i installed Centos web panel. Its amazing so far. This is my second time installing it as i messed something up the first time, first time i was able to change the apache template in each directory itself and it would change. Now i cant...I followed http://forum.centos-webpanel.com/apache/default-page-displayed-for-all-domains/ didnt work. First time around i followed http://www.servermom.org/basic-configuration-centos-web-panel/2009/ and http://www.servermom.org/activate-varnish-cache-server-cwp/2021/ and it worked. I went through it again. Didnt work this time. In my logs though it says: File does not exist: /var/www/html/search Directory index forbidden by Options directive: /var/www/html/ File does not exist: /var/www/html/search File does not exist: /var/www/html/albums Directory index forbidden by Options directive: /var/www/html/ I looked, it doesnt exist. Im lost on what to do here.
  10. which control panel

    I am new to VPS i only ever used windows dedicated before.i am looking for ideas for a free control panel and maybe some links to tutorials and demo's to take a look see if i can use it! I have looked at some already but like cpanel and other paid but for the amount of space i have its not worth paying for it tbh. many thanks in advance fr33hosting
  11. As a dedicated server or Virtual Private Server (VPS) owner, one of the important tasks is to defend against online attacks. In this tutorial I will discuss how to use IPset with dynamic blocklists to better secure your server. IP sets are a framework inside the Linux kernel, administered by the IPset utility. It makes the task of managing large lists of IP addresses in IPTables much easier and more efficient, and can be used on most servers EXCEPT on an OpenVZ VPS. How can we better secure our servers using IPSet? The answer is to take advantage of various IP blocklists maintained by security research companies or groups on the Internet, and deny access to these "bad" IPs and/or subnets. Continue reading at the original post on my blog: https://blog.ls20.com/securing-your-server-using-ipset-and-dynamic-blocklists/ Any questions or comments are welcome.
  12. I've been waiting for the new Openvpn 2.3.3 release that fixes the heartbleed bug to make it into the EPEL repository for CentOS, but it's taking forever. http://mirror.us.leaseweb.net/epel/6/i386/repoview/openvpn.html http://koji.fedoraproject.org/koji/packageinfo?packageID=2700 Is there an alternate repository somewhere that has the new build? If you're running CentOS and Openvpn, how are you dealing with it? I could compile it, but I'd like to avoid that if possible. As soon as I compile it, then they'll have a build the next day, no doubt.
  13. Hello guys, here is my tutorial for setting up "SSHFS" to create shared folder(s) among your VPS. We will be using "autossh" which has the nice "automatic reconnect" capability whenever the link goes down. Also implemented are settings such as "chroot" and "key use restrictions" which will strengthen security. These instructions have been tested on both Ubuntu 12.04 LTS and CentOS 6.5 Server. However, use at your own risk. Note that if you want to use this tutorial on an OpenVZ VPS, your provider MUST enable "FUSE" for your container. First, you need to decide on a "master" server where your shared folder will be physically stored. Your other "slave" server(s) will connect to this master server via SSHFS to share that folder's content. For the purpose of this tutorial, the folder to be shared on master server is named "/opt/sshfs_export", while each slave server will create a folder named "/opt/sshfs" to hold the shared content. All commands below run as user "root" unless otherwise noted. Alternatively you can use "sudo". The first step is to install the necessary software packages. Follow separate instructions below for Ubuntu and CentOS: For Ubuntu: apt-get update apt-get install nano fuse sshfs autossh -y For CentOS: # Make sure you install the "EPEL" repository first. # Check "/etc/yum.repos.d/". If already installed, skip this step. yum install wget -y wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm rpm -Uvh epel-release-6*.rpm # Next, proceed to install the needed packages: yum check-update yum install nano fuse fuse-sshfs autossh -y The instructions below are applicable for BOTH Ubuntu and CentOS. Create "fuse.conf", set correct permissions and allow all users to access shared folder: [ -f /etc/fuse.conf ] && cp /etc/fuse.conf /etc/fuse.conf.old echo "user_allow_other" > /etc/fuse.conf chown root:fuse /etc/fuse.conf chmod 640 /etc/fuse.conf Add user "autossh" and ensure it's a member of the "fuse" group: useradd -m -s /bin/false -G fuse autossh Prepare shared folder on "slave" server(s): mkdir /opt/sshfs chown autossh:autossh /opt/sshfs Now we switch to user "autossh" and generate SSH key to be used for authentication: su - autossh -s /bin/bash ssh-keygen (Accept the defaults to generate SSH key for "autossh". Leave passphrase empty.) exit Now, repeat steps above on ALL your other servers ("master" AND "slave") until they are all set up. Next, log on to each of your "slave" server, and do: cat /home/autossh/.ssh/id_rsa.pub Copy and paste the entire contents of the public key file displayed by the command above into a text editor. You should get one line for each "slave" server, beginning with "ssh-rsa" and ending with "[email protected]_HOSTNAME". Now, in your text editor, prefix every line with this (without the quotes): "no-port-forwarding,no-agent-forwarding,no-X11-forwarding,no-user-rc,no-pty " This will strengthen security so that only SFTP is permitted. If you need to allow port forwarding, replace the "no-port-forwarding" to something like "permitopen="127.0.0.1:8888"", where 8888 is the port to be allowed. Go back to your "master" server. Edit the file: mkdir -p /home/autossh/.ssh; chmod 700 /home/autossh/.ssh cd /home/autossh/.ssh touch authorized_keys; chmod 600 authorized_keys nano authorized_keys Paste the entire contents of your text editor at the end of the file, Ctrl-O and Enter to save, Ctrl-X to exit nano. Prepare the folder to be shared on "master" server: mkdir /opt/sshfs_export chown root:root /opt/sshfs_export cd /opt/sshfs_export mkdir test_dir touch test_dir/test_file chown -hR autossh:autossh * Edit your sshd_config in nano editor (on "master" server ONLY): nano /etc/ssh/sshd_config Make sure the settings below are correct in the sshd_config file. In addition, if there is any "AllowUsers" line present in sshd_config, be sure to add "autossh" to it. If not, there is nothing to worry about: RSAAuthentication yes PubkeyAuthentication yes AuthorizedKeysFile .ssh/authorized_keys UsePAM yes ClientAliveInterval 15 ClientAliveCountMax 6 Subsystem sftp internal-sftp Finally, add these lines at the end of sshd_config, Ctrl-O and Enter to save, Ctrl-X to exit nano: TCPKeepAlive yes Match User autossh ChrootDirectory /opt/sshfs_export ForceCommand internal-sftp X11Forwarding no AllowAgentForwarding no AllowTcpForwarding no If you need to allow port forwarding, replace the last line above with these two lines, where 8888 is the port to be allowed: AllowTcpForwarding yes PermitOpen 127.0.0.1:8888 Reload the configuration of "sshd" on "master" server with: # If Ubuntu: service ssh reload # If CentOS: service sshd reload Now you are almost done! Go ahead and login to each "slave" server, connect to the "master" server using the command below. This is a one-line command. Be sure to replace MASTER_SERVER_IP and MASTER_SERVER_SSH_PORT to appropriate values: su - autossh -s /bin/bash -c "/usr/bin/sshfs -o reconnect,compression=yes,auto_cache,cache_timeout=5,transform_symlinks,allow_other,idmap=user,ServerAliveInterval=60,ServerAliveCountMax=3,StrictHostKeyChecking=no,UserKnownHostsFile=/dev/null,ssh_command='autossh -M 0' [email protected]_SERVER_IP:/ /opt/sshfs -p MASTER_SERVER_SSH_PORT" You can then test the shared folder on each "slave" server. Enter command below and you should now see the "test_dir" and "test_file" we created on the "master" server. ls -lR /opt/sshfs Note that the "slave" servers cannot create files at the root of shared folder (e.g. /opt/sshfs). This is "by design" and must be done on the "master" server. However, the "slave" servers have full control of everything below that level. If you add content to the shared folder /opt/sshfs_export on "master" server, don't forget to change their ownership so that the "slave" servers can write to them. For example: chown -hR autossh:autossh /opt/sshfs_export/* To unmount the shared folder from each "slave" server, run the command: # First try the "normal" unmount command: /bin/fusermount -u /opt/sshfs # If above is unsuccessful, try doing a "forced" unmount. Data loss may occur. /bin/fusermount -uz /opt/sshfs Any questions or suggestions are welcome. Feel free to leave a comment.
  14. Hello All, I have been working on some scripts to help assist new Linux and VPS users in setting up DenyHosts on their server. Below I am including these scripts for you all to use: Some info on DenyHosts for those of you who don't know what it is: What is DenyHosts? DenyHosts is a script intended to be run by Linux system administrators to help thwart SSH server attacks (also known as dictionary based attacks and brute force attacks). If you've ever looked at your ssh log (/var/log/secure on Redhat, /var/log/auth.log on Mandrake, etc...) you may be alarmed to see how many hackers attempted to gain access to your server. Hopefully, none of them were successful (but then again, how would you know?). Wouldn't it be better to automatically prevent that attacker from continuing to gain entry into your system? DenyHosts attempts to address the above... and more. DenyHosts was the Unix Review: Tool of the Month for August 2005 It is a free project and you can get the package directly from their Sourceforge repo if you like: http://denyhosts.sourceforge.net/ I have written two scripts, one for Debian and one for CentOS to assist with setting up DenyHosts. The script provides the following assistance: 1. It installs all packages required by the Linux Distribution to run DenyHosts. 2. It sets DenyHosts up to start at boot of your server. 3. It provides for novice users interactive configuration of the config file with suggested settings. 4. Assists with adding a host to your /etc/hosts.allow that you do not want to become blocked. 5. Prompts you with the ability to modify the the config file and control file your self . 6. Can be re-ran at any time to be used to reconfigure DenyHosts Note: these scripts were written in my spare time and come with no guarantee/warranty or otherwise. The scripts are free to be used and modified as you like. Let me know of any bugs you see and I would be happy to update the script and fix any issues. DenyHosts installer by TheLinuxBug version 0.1i - CentOS Installer DenyHosts installer by TheLinuxBug version 0.1j - Debian Installer For quick install on your server: Debian: wget http://phoenix.phix-it.com/denyhosts/denyhost-debian.sh ; chmod +x denyhost-debian.sh ; ./denyhost-debian.sh CentOS: wget http://phoenix.phix-it.com/denyhosts/denyhost-centos.sh ; chmod +x denyhost-centos.sh ; ./denyhost-centos.sh Please feel free to leave any feedback or bug requests below. ;)
  15. Anyone here have any experience with Cherokee web server http://cherokee-project.com/ ? As well as Nginx web server ? One of my Centmin Mod users suggests I look at Cherokee web server and he said he did benchmarks against simple phpinfo php file and it was faster than Nginx and Litespeed web server ? I see Cherokee mentions a front line cache feature http://cherokee-project.com/doc/other_front_line_cache.html is that what is accelerating Cherokee for simple phpinfo php file benchmarks ? Right now I have a test CentOS 6.4 64bit server setup with Centmin Mod Nginx web server + OpenLiteSpeed web server + Cherokee web servers for testing. But Cherokee pretty foreign to me, so wondering if any Cherokee users have some tips to get me in the right direction for benchmark comparisons ? cheers