Updates from November, 2014 Toggle Comment Threads | Keyboard Shortcuts

  • Jay Versluis 11:50 am on November 2, 2014 Permalink | Reply
    Tags:   

    How to install Plesk on CentOS 7 

    Plesk-LogoInstalling Plesk on CentOS 7 hasn’t changed drastically from earlier versions, however CentOS is different than its predecessors. I’ve written an article about how to install Plesk on CentOS 6, but that was 3 years ago and thought it’s time for an updated version.

    Well here it is: Plesk 12, meet CentOS 7.

     

    Plesk Documentation

    Much of what I’m telling you and more is documented on the Parallels Plesk website:

    On the left hand side you’ll find a link to the current documentation, as well as handy links to purchase a license if you need to. The link will also answer your questions about the different editions of Plesk and direct you to the Parallels Forum.

     

    One-Click Installer

    The Plesk one-click installer is a script that downloads itself and determines the correct Plesk version for your OS. You won’t accidentally pick the wrong version for your distribution. Paste this and the installer will download the latest version of Plesk (12 at the time of writing):

    wget -O - http://autoinstall.plesk.com/one-click-installer | sh

    If you get an error message, wget may not be installed. Rectify this pitiful situation like this:

    yum install wget

     

    To download older versions of Plesk you can download the one-click-installer file and run it with the option –show-all-releases. This will give you the option to specify your desired Plesk version with –select-release-id. For more information, run the file with the –help option.

    I’ve noticed that the installer is much quicker than on previous versions of Plesk and is finished in under 10 mins (as opposed to half an hour previously). This is presumably due to many packages that are pre-installed with CentOS 7, so not much time is spent downloading stuff. Nice!

    Once finished the installer will give you a URL to login with – usually consisting of your IP, like https://10.1.2.3:8843

     

    Opening Ports for Plesk

    On CentOS 6 and prior the firewall rules were set via iptables. This service is gone and has been replaced with firewalld in CentOS 7. We still need to open ports to speak to Plesk via a browser. The two important ones to open here are 8443 and 8447:

     firewall-cmd --zone=public --add-port=8443/tcp --permanent
     firewall-cmd --zone=public --add-port=8447/tcp --permanent
     firewall-cmd --reload

    The –permanent option makes these rules “stick” upon restart.

    These are not the only ports Plesk needs to function, for a full list please see this KB article:

    There is usually no need to open other ports if you install the Firewall extension in Plesk, as this will manage the underlying service for you (and apply the necessary open ports). To do this, head over to Tools and Settings – Updates and Upgrades and install the Firewall Extension (under Additional Plesk extensions).

    Next head over to Extensions select the Firewall Module. Select “Enable Firewall Rules Management”, followed by another enable button. Now Plesk will manage the firewall for you and open all ports ready for web and email traffic.

     

    Add Atomic Repo Power (optional)

    If you’d like to supercharge your server, now’s a good time to install the Atomic repos. These will give you access to many additional tools such as pre-compiled OSSEC HIDS and additional PHP versions:

    wget -q -O - http://www.atomicorp.com/installers/atomic.sh | sh

     

    Loggin in for the first time

    With your dedicated IP handy, the installer script will have given you something like https://10.1.2.3:8443. Surf there and be presented with the Plesk login screen.

    But what are your credentials? I’m glad you asked: the first time you login to Plesk you can do so with your server root credentials. This even works on subsequent sessions, however Plesk creates an admin user for which you will specify the password during your first session.

    It is strongly recommended that you use that admin user for Plesk administrative tasks. You can also create additional administrators in Plesk once you’re up and running – so there’s no need to share your super secret password with colleagues and clients.

     

    Correcting your IP address (optional)

    It can happen that Plesk does not detect the correct IP address on your server. This was never the case in CentOS 6, but I’ve noticed this in CentOS 7. In my case the Plesk installer thought that the local loopback address was my main one (127.0.0.1) – which of course it was not.

    You can usually correct this on first login, but just in case you need to do this from the command line, check this helpful KB article:

     

    License Key and Additional Components

    You need a license to operate Plesk. You’ll get this either from your server provider (if Plesk is part of your deal), or you can buy one directly from Parallels. You can also run Plesk as a 14 day trial version. If you don’t enter this you can still use the Plesk interface but you’ll be limited to a single domain and several options are unavailable.

    In case you’re missing menu items that you had expected to be there, it’s probably a license issue.

    I find it helpful to head over to Tools and Settings (or the Server Tab) – Plesk – Updates and Upgrades and install several additional components, such as

    • Health Monitor
    • Migration Manager
    • Firewall (under Additional Plesk Extensions)
    • Watchdog (under Additional Plesk Extensions)
    • Spam Assassin (under Mail hosting features)
    • Kapersky Anti Virus (under Mail hosting features)

    You can also install Fail2ban from this menu if you like – I personally rely on OSSEC to deal with intrusion detection and choose not to use Fail2ban at this point.

     

    That’s it! Have fun with Plesk ;-)





     
  • Jay Versluis 12:52 pm on August 26, 2014 Permalink | Reply
    Tags:   

    What is the End-of-Life (EOL) for CentOS Distributions 

    The End-of-Life (EOL) for CentOS Distributions is as follows:

    Screen Shot 2014-08-26 at 12.46.37

    More under Section 21 in this article:





     
  • Jay Versluis 7:12 am on June 28, 2014 Permalink | Reply
    Tags: , ,   

    How to enable Touchpad Taps as Mouse Clicks on your NC10 in CentOS 

    CentOS-LogoThe NC10’s integrated Synaptics Touch Pad works out of the box in CentOS 6, both under GNOME and KDE. No drivers or patches requried.

    But I remember that when it was running Windows XP I could “tap” the pad instead of clicking the dedicated key (that loud CLACK noise annoys the neighbours). How can we bring this behaviour to CentOS?

    A quick serach reveals this post by Russel in the CentOS forum:

    his suggests that a configuration file needs to be created somewhere. However I found that there’s an easier solution which – at least on the NC10 – works with just one click. I assume this will work for other latops too:

    • head over to System – Preferences – Mouse
    • select the Toucpad tab at the top
    • tick the box “enable mouse clicks with touchpad”
    • works instantly

    Tourpad-Taps





     
  • Jay Versluis 11:39 am on June 27, 2014 Permalink | Reply
    Tags: , sudo   

    How to add a CentOS user to the sudoers list 

    CentOS-LogoWhen you try to prefix a command with sudo on a fresh CentOS system you may be greeted with a message such as “you are not part of the sudoers list” and that the incident will be reported.

    Not to the FBI, but to a log file. And of course your sudo operation isn’t going to work.

    That’s because individual users to the system need to be granted permission to executer root level commands, even if it’s only temporary. Here’s how to do it.

    PLESE NOTE:
    I seem to be the only person on the planet who did this successfully. Since then, everyone who’s tried to follow these instructions breaks their servers and blames me for it. I still don’t know the problem because nobody tells me what’s wrong with this approach – just in general that it sucks.

    Please be aware that there is a better way to do this using VISUDO

    !!! PROCEED AT YORU OWN RISK!!! Use test systems. Make backup copies of this measly single line file. Check other sources but DO NOT BLAME ME IF YOU BREAK THINGS.

    Thank you!

    Here’s what worked for me without a hitch: In essence, you need to add your user to a file called sudoers which lives in /etc/sudoers on CentOS 6.5. I have not tried this on CentOS 7. This file is read only, even to the root user – so before tweaking it we need to change its permissions, otherwise your edits can’t be saved:

    chmod 666 /etc/sudoers

    Now use your favourite text editor and find the following section:

    vi /etc/sudoers
    
    ...
    
    ## Next comes the main part: which users can run what software on
    ## which machines (the sudoers file can be shared between multiple
    ## systems).
    ## Syntax:
    ##
    ##     user    MACHINE=COMMANDS
    ##
    ## The COMMANDS section may have other options added to it.
    ##
    ## Allow root to run any commands anywhere
    root    ALL=(ALL)     ALL
    youruser ALL=(ALL)  ALL
    

     

    Add your own user name underneath the root user (as shown above), then save the file and exit. Don’t forget to change the file permissions back to 440 just like they were before:

    chmod 440 /etc/sudoers

     





     
    • chicofranchico 10:07 am on September 19, 2014 Permalink | Reply

      This way is not a very safe way to edit the sudoers file so you better use visudo instead which is a lot more secure.

      http://www.courtesan.com/sudo/man/1.7.10/visudo.man.html

      • Jay Versluis 11:31 am on September 19, 2014 Permalink | Reply

        Thanks for the tip, I hadn’t heard of visudo before – I’ll check it out!

    • Tyler 12:24 pm on November 6, 2014 Permalink | Reply

      Hmm. This really screwed up my day thanks. Wish I would have looked at the comment before I did this.

    • David 10:48 am on November 19, 2014 Permalink | Reply

      DO NOT FOLLOW THIS…Broke my sudoers file…please for the love of god take it down.

      • Jay Versluis 11:43 am on November 19, 2014 Permalink | Reply

        Thanks for your feedback David, I’ll add a warning at the top.

  • Jay Versluis 4:41 am on June 26, 2014 Permalink | Reply
    Tags: , Dropbox,   

    How to install Dropbox on CentOS 6.5 (from source) 

    Dropbox-LogoBeing the sport that I am I thought I’d install Dropbox from source on my NC10. Even though an rpm installer package is available, I do enjoy a challenge.

    My laptop is cunnrently running CentOS 6.5 (32bit) and has GNOME installed.

    Turns out I needed a couple of packages – and before I forget, here’s how I did it. We’ll do all this from the command line (you have to be root for this):

    Pick the latest .tar file from here https://linux.dropbox.com/packages/, then download it with

    wget https://linux.dropbox.com/packages/nautilus-dropbox-1.6.2.tar.bz2

    Extract and enter the directory it produces:

    tar -xjf nautilus*
    cd nautilus-dropbox-1.6.2
    

    At this point the following sequence of commands should build the project:

    ./configure
    make
    make install
    

    However on my system I received an error message after ./configure, letting me know that I needed the libnautilus-extension and docutils packages. I installed them with

    yum install docutils nautilus-devel
    

    Once installed, make and make install worked fine.

    Now Dropbox is installed but it’s not running or configured. Let’s do that next:

    dropox start -i
    

    This will start the daemon and prompt you to download the desktop client from the GUI which will allow you to login and sync your content, just like on Windows and Mac.





     
    • lsatenstein 10:25 am on June 26, 2014 Permalink | Reply

      I guess it’s the challenge to do the non rpm installation, and you enjoy it.

      I just downloaded the Fedora version and subsequently did sudo yum install ./nautilus…. .

      Yum resolved the “Need to have issue”

      In doing the setup, did you find a way to delay dropbox startup after a user logs in to his computer account? I frequent hot spots with my laptop, where the laptop needs wi-fi access before any communication can occur. Dropbox, in this situation, gets in the way, impeding the webbrowser logon to the wifi network. Of course, once the wifi security is resolved, dropbox is able to work.

      • Jay Versluis 9:25 am on June 27, 2014 Permalink | Reply

        Indeed, at times and in moderation. 90% of the time I’m a yum man myself ;-)

        Yes I know what you mean about the immediate Dropbox connection, I have this problem myself. I don’t know of a way to delay the initial connection, I usually just right-click on the Dropbox symbol in the top bar and select “quit Dropbox” which stops the syncing process unti I reboot or manually start Dropbox again.

        Likewise, I have machines on which I’ve disabled the Dropbox auto start (in the same dialogue box), usually when I know this machine won’t be connected to a fast connection for long and otherwise would interfere with quick sessions. This approach works well on all platforms and is identical on Windows and Mac.

        Not the answer you’re looking for I know – but an easy workaround.

    • Tommi P. Laiho 6:38 am on September 7, 2014 Permalink | Reply

      This was really excellent tutorial. It saved me lots of gray hairs. Thank you very much. Rpmforge offered ready rpm with yum but it was dated. This really saved my day.

      • Jay Versluis 9:26 am on September 8, 2014 Permalink | Reply

        Thanks Tommi, glad I could help!

  • Jay Versluis 1:35 pm on June 25, 2014 Permalink | Reply
    Tags: , ,   

    How to install GNOME on your Samsung NC10 (CentOS 6.5) 

    CentOS-LogoWith the WiFi card on my NC10 enabled, I struggled to connect to my actual WiFi network from the command line (WPA2). After an entire day of research, trial and error I had to admit to myself that setting this up on a minimal CentOS 6 installation is simply beyond me.

    Likewise, monitoring the levels of my new battery had me greatly puzzled.

    But those two points aside, I also wanted to install a Desktop type environment on my NC10 so it would be more useful – now that it has a new battery and all.

    As it turns out installing GNOME – almost as a side effect – will take care of both those problems in a flash: easily connecting the NC10 to my WiFi network, monitoring my battery, and so much more.

    Let me show you how I did it.

    My machine has a minimal CentOS 6.5 installation on it and I’ve installed the Atheros driver as explained in my previous article. I’m on a wired network connection to install the additional GNOME packages.

    yum groupinstall

    I didn’t know this but yum is even more magical than I always thought: not only can it install single packages and resolve their dependencies; yum can also install entire sets of packages called groups.

    To see what’s available type

    yum grouplist

    This will show you a huge list of available and installed groups. We’re interested in the following:

    • Desktop
    • Desktop Platform
    • X Window System
    • Fonts
    • Internet Browser

    To install all those without being asked for every group, type

    yum -y groupinstall "Desktop" "Desktop Platform" "X Window System" "Fonts" "Internet Browser"

    Since groups can have spaces in their names it is necessary to put them into “quotes” . Once issued, yum will go to work. This will take some time so let’s grab coffee.

    Thanks to the Vagabond Geek and Jeff Hunter for the above info.

    Using GNOME by default

    Now that my NC10 is more of a laptop rather than a remote web server, I like the idea of booting into the desktop environment by default. To do this tweak a single number in /etc/inittab:

    // to edit the file 
    vi /etc/inittab
    
    // change this line 
    id:3:initdefault:
    
    // to 
    id:5:initdefault:

    Above this line you’ll see an explanation of what each ID will do at boot time. Realistically you’ll only ever need to worry about 3 and 5. Save the file and restart your system – and upon next boot you’re prompted to create a new user, or login with existing credentials.

    Change it back anytime you like.

     

    NC10 – meet GNOME

    I had looked at GNOME many years ago on an old and long retired slow Sony Vaio laptop – and was surprised how relatively slick it runs on the NC10’s underpowered hardware.

    To my surprise things like the integrated Samsung Function keys for screen backlight and volume were working out of the box without the need for additional drivers or patches! Just like the touchpad – it just works. Same with monitoring my battery level.

    Bravo, CentOS! Here’s what the NC10 looks like running GNOME:

    GNOME on NC10

     

    Connecting to your WiFi Network

    GNOME isn’t all that different from other desktop OSes and reminds me of Windows and Mac OS X. You connect to your local network simply by clicking the “antenna” type symbol at the top of the screen, pick your network from the list and enter the password.

    If you’ve ticked the relevant box, you’ll be connected automatically on subsequent logins.

     

    Why CentOS on the NC10? Why not use Windows?

    My NC10 came with Windows XP back in 2009 when I first bought it – because Vista was such a joke and nobody wanted it.

    Later models of the NC10 came with Windows 7, but 2GB of RAM are highly recommended – and mine only has 1 GB. “Recommended” doesn’t mean that the experience is going to be great though. Windows 8 isn’t even an option on the NC10.

    But more importantly, XP is has ended extended support in April 2014 – and Windows 7 is going to exit mainstream support in January 2015. At the time of writing that’s in 6 months.

    CentOS 6 will be around until 2020 and copes extremely well with the NC10’s hardware.

     

    I’m confused: X11, GNOME, KDE… what’s all this?

    You and me both, brother! As I understand it, GNOME and KDE are both desktop systems that show you a graphical user interface (GUI) – much like Windows and Mac OS X. They both look slightly different and are developed by different teams.

    X11 is the actual engine that allows apps to interact with content in windows. This wasn’t always the case, especially in the early age of computers which were text and column based. X11 is a breakthrough and allows for processing to happen on a remote machine, while graphics are rendered on the local system.

    As with many things in Linux, you have a choice of which GUI you’d like to run: GNOME or KDE. You can even install both on your system and boot into the one you fancy:

    yum -y groupinstall "KDE Desktop"

    Or, from GNOME, head over to System – Administration – Add/Remove Software and search for KDE, then install it from there.

    Once the install is complete, log out (top right) and log back in, selecting your desired interface from the drop down at the bottom. Here’s what it looks like on the NC10:

    KDE-NC10

    Both systems get the job done and it really comes down to personal preferences and needs.

    GNOME is a more “barebones”, while KDE contains accessories like a calculator, games, different web browser and a whole lot of other stuff by default.

    I found that on the NC10 I much prefer GNOME over KDE – perhaps because GNOME reminds me of Mac and KDE of Windows. As I said, it’s really about personal taste.

     

    Further Reading





     
    • Jay Versluis 4:34 pm on November 15, 2014 Permalink | Reply

      In CentOS 7 the groups are different, but yum grouplist will still work and show you the relevant items. For example, to install GNOME on CentOS 7 you now need to use

      yum groupinstall "GNOME Desktop"
      
  • Jay Versluis 6:49 pm on June 23, 2014 Permalink | Reply
    Tags: ,   

    How to enable WiFi on your Samsung NC10 under Centos 6.x 

    NC10When I installed CentOS on my NC10 last year I did so knowing that its battery was bust. Since it wasn’t going to live without a power supply, I didn’t setup WiFi at the time – the NC10 being tied to one cable, I simply added another (the network cable) and that was that. Worked fine and without problems.

    Today a new battery for my NC10 arrived, breathing new (wireless) life into the little guy – and needless to say now I wanted to setup WiFi. Sadly I don’t know enough about network adaptors under CentOS, so I thought how hard can it be?

    Actually it’s easy – it’s just not very well documented on the whole wide web due to the multitude of Distribution vs Hardware configurations.

    Thanks to two great articles (by Joris and Paul – find links at the end) I managed to connect my NC10 to my WiFi network: an Apple AirPort Timecapsule. It works a treat. Thanks guys!

    I deviated a little from both articles, so here’s the “remix” which should work specifically for the Samsung NC10. I’m running CentOS 6.5 in 32bit, minimal installation without any bells or whistles, on a 1GB Intel Atom machine.

    (More …)





     
  • Jay Versluis 12:08 pm on April 8, 2014 Permalink | Reply
    Tags: ,   

    How to use FTP from the Linux Command Line 

    folder_downloadsYou can use the ftp command to talk to an FTP server from the Linux Command Line. Type ftp to see if the tool is installed. If you get a “command not found” message then go ahead and type yum install ftp to make it available on your system.

    Using it is very straightforward – but I keep forgetting how because I only do it once in a blue moon. So here’s a handy cheat sheet:

    Logging in to your FTP Server

    Assuming our site is example.com, simply type this:

    ftp example.com
    
    Connected to example (12.34.56.78).
    220 FTP-Example
    Name:

    This will connect you, but the system wants to know the username and password at the prompt. Provide those and if your login was successful you’ll see something like this:

    230 User tester logged in
    Remote system type is UNIX.
    Using binary mode to transfer files.
    ftp>

    Note that you’re now at the FTP command line and no longer on the Linux command line (you can tell by the ftp> in front of the cursor). Therefore only FTP commands are now accepted, until you type “exit” or “bye” to go back to Linux.

    To see a list of available commands type help and you’ll see a list much like this:

    Commands may be abbreviated.  Commands are:
    
    !		debug		mdir		sendport	site
    $		dir		mget		put		size
    account		disconnect	mkdir		pwd		status
    append		exit		mls		quit		struct
    ascii		form		mode		quote		system
    bell		get		modtime		recv		sunique
    binary		glob		mput		reget		tenex
    bye		hash		newer		rstatus		tick
    case		help		nmap		rhelp		trace
    cd		idle		nlist		rename		type
    cdup		image		ntrans		reset		user
    chmod		lcd		open		restart		umask
    close		ls		prompt		rmdir		verbose
    cr		macdef		passive		runique		?
    delete		mdelete		proxy		send

    No need to panic: The good news is that we don’t really use a plethora of new commands, and some (like ls and mkdir) are working the same way, just the output may look a bit different.

    Let’s go through a few common scenarios now: listing and creating directories, uploading, downloading, and deleting files. Classic CRUD – FTP Style.

    If you ever need to come out of a running command, CMD-D (or CTRL-D) will do the trick.

    Listing and Switching Directories

    Your usual Linux favourites will work fine to list and switch directories:

    ls (list directory, same as dir)
    cd (change into directory, for example “cd mydir”)
    cd .. (move one directory up in the tree)

    Excellent: nothing new to learn here. Result!

    Creating and Deleting Directories

    Another nice thing is that mkdir is still working to create a directory. Here’s how we create a directory called test:

    mkdir test
    
    257 "/test" - Directory successfully created

    Likewise, rmdir does a good job at deleting (empty) directories:

    rmdir test
    
    250 RMD command successful

    To delete a directory that contains files you must first remove all files (see below under Deleting Files) and then use this command.

    Downloading Files

    To download a single file we can use the get command (or recv if you can remember it better). You must type out the entire file name for this to work, and you won’t get a progress report while your file downloads:

    get testfile.tar
    
    local: testfile.tar remote: testfile.tar
    227 Entering Passive Mode (81,169,163,229,179,131)
    150 Opening BINARY mode data connection for testfile.tar (86365356 bytes)
    226 Transfer complete
    86365356 bytes received in 11 secs (7865.17 Kbytes/sec)

    This will save testfile.tar in the Linux directory that you were before you initiated the FTP session.

    To save files in a directory other than the current one, I’m afraid you’re going to have to log out, cd into the directory you want those files to go, then re-connect. I know, ultra lame – but if there is another way then it’s kept so secret that no Google search will ever unveil it.

    Sadly wildcards are no working in this operation, so you’ll always have to type out the exact file name. Lucky for us you CAN use wildcards to download multiple files with mget, like this:

    mget test*

    Now all files starting with “test” are downloaded and you’ll be prompted one by one. This will work for single files too and saves you having to type out cryptic long names. Human 1 – FTP 0. Ha!

    Uploading Files

    put and mput work just like get, but they upload local files to the current FTP directory. You can specify a local Linux path when doing this, but put and mput expect a local path to also exist on the FTP remote (and fail if they don’t). Read: messy. There probably is a way to deal with this, but life’s just too short.

    Just like get, put also needs the whole file name and cannot deal with wildcards – but mput does:

    mput test*
    
    mput testfile.tar? y
    227 Entering Passive Mode (81,169,163,229,218,225)
    150 Opening BINARY mode data connection for testfile.tar
    226 Transfer complete
    236716 bytes sent in 0.0141 secs (16825.36 Kbytes/sec)

    Deleting Files

    There’s also a delete and mdelete command which – you guessed it – removes unwanted files from the server. Same as before: no wildcards on delete, but they work fine on mdelete:

    mdelete test*
    
    mdelete testfile.tar? y
    250 DELE command successful

    Alternatives

    FTP transfers all files and passwords “in the clear” and does not work with encryption. Checkout the sftp command which will do all of this and more while using encryption on all transfers.

    Note that there is a difference between SFTP and FTPS: the latter (FTPS) is the same as FTP but with encryption added to it. SFTP isn’t really FTP at all, it’s an SSH connection that works much like rsync and scp, and uses similar syntax.

    Further Reading





     
  • Jay Versluis 7:12 pm on March 26, 2014 Permalink | Reply  

    How to log into MySQL as root user in Plesk 

    Plesk-LogoYou may have noticed that there is no MySQL root user on servers running Plesk. That’s because Plesk renames this user into “admin” by default – for security reasons.

    The password for the admin MySQL account is the same as for the Plesk Panel admin account.

    Even so, when you try to login to MySQL – remotely or locally – you may be puzzled to find that your admin password doesn’t seem to work. Let me assure you of your sanity and your keyboard skills: it’s because Plesk encrypts the password in the database.

    It is the encrypted version that you must present to MySQL, not the clear version. For example, if your password was indeed “password”, then the following command will not grant you access to MySQL:

    mysql -u admin -ppassword

    You can check your unencrypted password by issuing the following command (on Linux servers):

    /usr/local/psa/bin/admin --show-password

    In our example, it will indeed show “password” – so why doesn’t it work? It’s because that command will unencrypted the password for us. MySQL however needs the encrypted version. Here’s how we can extract this from Plesk:

    cat /etc/psa/.psa.shadow
    
    // will show you something like
    $AES-128-CBC$w78TYgIfzDsKjOvEqkg/nQ==$O4xPUtsQe1TI3P601wQgYw==

    This will give you a weird looking output as shown above. Believe it or not, that’s your MySQL admin password!

    If you’re already logged into your server as root and want to issue a MySQL shell command, you can login to MySQL like so:

    mysql -uadmin -p`cat /etc/psa/.psa.shadow`
    
    Welcome to the MySQL monitor.  Commands end with ; or \g.
    Your MySQL connection id is 4231837
    Server version: 5.5.36-cll-lve MySQL Community Server (GPL) by Atomicorp
    
    Copyright (c) 2000, 2014, 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.
    
    Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
    
    mysql>

    If you’re attempting a remote connection to MySQL then simply paste that cryptic looking password you got in the earlier step.





     
    • diego 12:54 am on November 2, 2014 Permalink | Reply

      If your memory is a bitch, like mine use this to access directly:

      root@server:[~]: cat /etc/psa/.psa.shadow
      $AES-128-CBC$S2oUU99k2Qs988Ds0Cmq0w==$7/Ec2BecQpaL5XpimHrPs4UWxUis509CVBseFB1+w/GjXkfDOkMYw8u7/io7YurU

      root@server:[~]: cat /root/.my.cnf
      [client]
      password=$AES-128-CBC$S2oUU99k2Qs988Ds0Cmq0w==$7/Ec2BecQpaL5XpimHrPs4UWxUis509CVBseFB1+w/GjXkfDOkMYw8u7/io7YurU
      user=admin

      root@server:[~]: mysql
      mysql>

  • Jay Versluis 2:52 pm on March 10, 2014 Permalink | Reply
    Tags: , postfix   

    The Postfix Cheat Sheet 

    mail-iconI recently had some trouble with my postfix mail service. Not knowing where to being looking for log files and restart commands, I thought this quick cheat sheet would come in handy in the future:

    Starting and Stopping

    On CentOS we can speak to postfix like this:

    postfix start
    postfix stop
    postfix reload

    The this command re-reads the configuration files. Note that there is no restart command – you have to stop and then start the service again manually.

    Log Files

    On CentOS 6.5 I could find the log files in /var/log/maillog (that’s a file not a directory). Other installations may have it in /var/log/mail. Refer to your own /etc/syslog.conf file for the exact location.

    To display log events life we can make use of tail -f

    tail -f /var/log/maillog

    Alternatively we can come through the entire log and display the tricky bits:

    egrep '(warning|error|fatal|panic):' /var/log/maillog | more

    Note that log files are rotated – what you’re looking for may be hiding in other log files (such as maillog-201xxxxx).

    Postfix in Plesk

    If you’re using Plesk then you can see the individual components of the service under Tools and Settings (or Server if you’re using Power User View) – Services Management. You can start/stop/restart each aspect from here.

    Sometimes the SMTP service appears to be offline even though it’s running. This can happen on CentOS. It’s nothing to worry about – simply restart the service from the command line as explained above and it should show up fine in Plesk.

    Screen Shot 2014-03-10 at 14.51.03

    Further Reading

    If you have any further ideas, please let me know in a comment below.





     
c
Compose new post
j
Next post/Next comment
k
Previous post/Previous comment
r
Reply
e
Edit
o
Show/Hide comments
t
Go to top
l
Go to login
h
Show/Hide help
shift + esc
Cancel