B
B
buttlessrider2020-06-22 07:37:14
linux
buttlessrider, 2020-06-22 07:37:14

How to set up a server?

Hi all! I understand that there are many instructions, but many are outdated. something is not working.
I want to put an ubuntu server on an old laptop. Recently, the wi-fi adapter (built-in) died, now I installed an external one from the tlink - if it's important ...
Help, who has time. Just a list of actions/commands.
If there is no time - ignore it!
Manuals and really looked a lot! But the errors keep coming, but it doesn’t say how to solve them, obviously everything has changed ... WordPress doesn’t allow you to edit or add anything, I read about it, but why isn’t it said at the server installation stage :(

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Semyon Abezgauz, 2020-06-22
@buttlessrider

Hello.
Good to know about the adapter.
Insert the cord from the Internet into the laptop.
Further, it is assumed that you have successfully launched the server installation by setting the necessary settings in bios (from a flash drive, disk - that's not the point).
Make markup (here the instructions are not outdated).
Connect to your network (analgin).
Wait for the installation to complete and take the car to reboot.
Now (assuming you're in a terminal):
Get the name of the device.
iw dev
iw wlваши_цифры link

>>not connected...

Indicates that the device is not connected to any network.
Scan available networks.
iw wlваши_цифры scan
>> command failed: Network is down (-100)

Indicates that the network device/interface is disabled.
sudo ip link set iw wlваши_цифры up
Turn on.
Re-displaying the list of available networks will give a profit, but the next command will require the installation of additional packages, but there are no Internet. Therefore, it is always desirable to initially configure the server with the Internet cable connected (lyrics).
We connect to the desired network.
nmcli dev wifi connect ROUTERSSID SPI
Google ROUTERSSID SPI - these are important concepts.
We analyze the exhaust when pinging to an external machine:
ping 8.8.8.8
If everything is ok, unplug the cord.
Now, update the OS:
sudo apt-get update
sudo apt-get dist-upgrade

You read what ufw is, but for now:
sudo ufw allow from локальный_адрес_клиента
where is the local address of the client (you can find out, for example, from the router's admin panel or with special commands that are publicly available on Google)
sudo ufw enable
Start.
By doing this, you have allowed EVERYTHING for the client and turned on the firewall.
Next: Let's
sudo apt-get install apache2
sudo service apache2 status
look ....
sudo service apache2 start
If Google did not
sudo a2enmod rewrite
turn on, what is it and why (mod_rewrite)
sudo apt-get install mysql-server
sudo apt-get install phpmyadmin
When asked about what to compare with (or something like that), choose Apache.
Then you start configuring Apache:
sudo nano /etc/apache2/apache2.conf
and paste at the end:
Include /etc/phpmyadmin/apache.conf

You give rights.
sudo chmod -R 755 /var/www
sudo chown -R ваш_логин:ваш_логин /var/www

Check the name.
For database operation.
sudo -i
mysql -uroot -p
SELECT user,plugin,host FROM mysql.user WHERE user = 'root';
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'введите_желаемый_пароль';
FLUSH PRIVILEGES;

Exit sudo.
exit
Create a simple page:
mkdir /var/www/wp
nano /var/www/wp/index.html
<html>
<head>
<title>testerer</title>
</head>

<body>

Hello, kitty!

</body>
</html>

Ctrl+S
On the client:
sudo nano /etc/hosts
Add the line:
# Временнное
ip_сервера wp.local www.wp.local

ctrl+s
sudo cp -P /etc/apache2/sites-available/000-default.conf /etc/apache2/sites-available/wp.conf
sudo nano /etc/apache2/sites-available/wp.conf
Раскомментируем: #ServerName www.example.com и заменим на ServerName wp.local
DocumentRoot /var/www/html на /var/www/wp

This is the config for the new site.
sudo a2ensite wp.conf
This is his inclusion.
sudo service apache2 restart
And you can already see the page in the browser on the client. Or upload the engine archive to the project folder, delete index.html and install the site.
Databases are available on the local network at: server_address/phpmyadmin/
You will need:
mc
w3m (or someone else)
Attention! This is the minimum of minimums!
ps
Here it dawned on me. Do you need all this under Apache?
pss
Most wrote from memory, verified some exhausts by googling. Well... If there are errors, the essence should still be clear in combination with "non-actual mana".

S
Sergey Pankov, 2020-06-22
@trapwalker

Hi all! I understand that it would be necessary to see a doctor, but somewhere I sowed a policy and I’m embarrassed to call an ambulance, especially since doctors will only stuff pills and chemicals.
I have two knives, kitchen pegs, and four sturdy sturdy stools.
I want to cut out my own appendix.
Recently I lost my legs (I sat on the toilet for a long time, tried to take the turtle out), but the sensitivity is restored, it tingles in my feet, but I don’t feel my ass (if this is important ...).
Help, who has time. Just a list of actions/commands.
If there is no time - ignore it!
Manuals and really looked a lot! But, it hurts to cut the belly, apparently you still need to sit on the point so that the anesthesia rises higher.
In general, the plaster, of course, interferes, the hands turn badly, I read about it, but why is it not said that I got stuck at the stage of processing the surgical field :(

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question