wiki:rpilinuxjesse
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
wiki:rpilinuxjesse [2016/07/23 19:16] – created walkeradmin | wiki:rpilinuxjesse [2023/03/09 22:35] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 4: | Line 4: | ||
\\ | \\ | ||
\\ | \\ | ||
- | ===== Configure Static IP Address ===== | + | The commands here will work regardless of the Raspberry Pi hardware (not sure about the compute module) but will work with the Raspberry Pi1/2/3 and Zero. |
\\ | \\ | ||
- | Raspbian Jesse changed the way a static IP Address is configured. The static IP settings are now held in a file located in the // | ||
\\ | \\ | ||
- | \\ | + | [[Configure Static |
- | To edit the dhcpcd.conf file, enter: | + | [[Command Line MySQL]]\\ |
- | \\ | + | [[UFW - Uncomplicated Firewall]]\\ |
- | //**sudo / | + | [[Restart Apache2 Web Server]]\\ |
- | \\ | + | [[Check Disk Space]]\\ |
- | \\ | + | [[Change Password]]\\ |
- | At the end of the file add the following lines (with your own IP Address | + | |
- | \\ | + | |
- | \\ | + | |
- | //**eth0 | + | |
- | \\ static ip_address=192.168.1.14/ | + | |
- | \\ static routers=192.168.1.1 | + | |
- | \\ static domain_name_servers=192.168.1.4**// | + | |
- | \\ | + | |
- | \\ | + | |
- | Save and reboot. | + | |
- | \\ | + | |
- | \\ | + | |
- | ===== Command Line MySQL ===== | + | |
- | \\ | + | |
- | Here are a few useful MySQL commands you can run from the command line, handy if you have installed MySQL and you don't have desktop access or a graphical MySQL manager application. | + | |
- | \\ | + | |
- | \\ | + | |
- | Login to MySQL | + | |
- | First we must login | + | |
- | \\ | + | |
- | //**mysql -u root -p**// --- (the // | + | |
- | \\ | + | |
- | \\ | + | |
- | Create a MySQL Database | + | |
- | \\ | + | |
- | //**CREATE DATABASE new_database; | + | |
- | \\ | + | |
- | \\ | + | |
- | Show a MySQL Database | + | |
- | \\ | + | |
- | //**SHOW DATABASES; | + | |
- | \\ | + | |
- | \\ | + | |
- | \\ | + | |
- | ===== UFW - Uncomplicated Firewall | + | |
- | \\ | + | |
- | \\ | + | |
- | Uncomplicated Firewall //**UFW**// is a much simpler security solution than using iptables, it is very easy to install and configure. iptables might ultimately have more features, but I think UFW is suitable for most users. | + | |
- | \\ | + | |
- | \\ | + | |
- | To install //**UFW**// from the command line: | + | |
- | \\ | + | |
- | //**sudo apt-get install ufw**// | + | |
- | \\ | + | |
- | \\ | + | |
- | To allow all ports on the local subnet: | + | |
- | \\ | + | |
- | //**sudo ufw allow from 192.168.0.0/ | + | |
- | \\ | + | |
- | \\ | + | |
- | Allow web port 80 to everyone (internal and external LAN) | + | |
- | \\ | + | |
- | //**sudo ufw allow 80**// | + | |
- | \\ | + | |
- | \\ | + | |
- | To enable UFW and start rules: | + | |
- | \\ | + | |
- | //**sudo ufw --force enable**// | + | |
- | \\ | + | |
- | \\ | + | |
- | \\ | + | |
- | ===== Restart Apache2 Web Server | + | |
- | \\ | + | |
- | \\ | + | |
- | From time to time it might be necessary to restart the Apache Web Server, normally this is required after a configuration change, or if a site has stopped. | + | |
- | \\ | + | |
- | \\ | + | |
- | From the command line: | + | |
- | \\ | + | |
- | //**sudo / | + | |
- | \\ | + | |
- | \\ | + | |
- | \\ | + | |
- | ===== Check Disk Space ===== | + | |
- | \\ | + | |
- | \\ | + | |
- | Working from the command line has some disadvantages, | + | |
- | \\ | + | |
- | \\ | + | |
- | From the command line: | + | |
- | \\ | + | |
- | //**df -h**// --- (the -h means human readable format, so instead values being in bytes, they are displayed at MB or GB etc) | + | |
- | \\ | + | |
- | \\ | + | |
- | $ df -h\\ | + | |
- | \\ | + | |
- | Filesystem | + | |
- | / | + | |
- | devtmpfs | + | |
- | tmpfs | + | |
- | tmpfs | + | |
- | tmpfs | + | |
- | tmpfs | + | |
- | / | + | |
- | tmpfs 44M | + | |
- | \\ | + | |
- | \\ | + | |
- | \\ | + | |
- | ===== Change Password | + | |
- | \\ | + | |
- | \\ | + | |
- | To change the password for a user, when logged in as that user, from the command line enter: | + | |
- | \\ | + | |
- | \\ | + | |
- | //** sudo passwd pi **// --- (make sure you use the correct username, pi is just for the example) | + | |
- | \\ | + | |
- | you will then be prompted to enter, then re-enter the new password | + | |
- | \\ | + | |
- | \\ | + | |
- | //** | + | |
- | $ sudo passwd pi\\ | + | |
- | Enter new UNIX password:\\ | + | |
- | Retype new UNIX password:\\ | + | |
- | passwd: password updated successfully | + | |
- | **// | + | |
- | \\ | + | |
- | \\ | + | |
- | + |
wiki/rpilinuxjesse.txt · Last modified: 2023/03/09 22:35 by 127.0.0.1