Hoy realizaremos la instalacion de odoo 13 en una maquina virtual centos 8 minimal desde 0.
1. Verificamos si tenemos instalado DNF con el Siguiente comando.
siguiendo lo de mas abajo.
Hoy realizaremos la instalacion de odoo 13 en una maquina virtual centos 8 minimal desde 0.
1. Verificamos si tenemos instalado DNF con el Siguiente comando.
$ sudo dnf install epel-release
$ sudo dnf install python36 python36-devel git gcc wget nodejs libxslt-devel bzip2-devel openldap-devel libjpeg-devel freetype-devel
$ sudo dnf install postgresql-server postgresql-contrib
$ sudo postgresql-setup initdb
$ sudo systemctl restart postgresql $ sudo systemctl enable postgresql
$ sudo systemctl status postgresql
$ sudo dnf install https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox-0.12.5-1.centos8.x86_64.rpm
$ sudo useradd -m -U -r -s /bin/bash odoo -d /opt/odoo
$ sudo su - odoo
$ git clone https://www.github.com/odoo/odoo --depth 1 --branch 13.0 /opt/odoo/odoo13
$ cd /opt/odoo $ python3 -m venv odoo13-venv
$ source odoo13-venv/bin/activate
pip install --upgrade pip
$ pip3 install -r odoo13/requirements.txt
$ deactivate && exit
$ sudo mkdir /opt/odoo/odoo13-custom-addons $ sudo chown -R odoo:odoo /opt/odoo/odoo13-custom-addons
$ sudo mkdir /var/log/odoo13 $ sudo touch /var/log/odoo13/odoo.log $ sudo chown -R odoo:odoo /var/log/odoo13/
$ sudo vim /etc/odoo.conf
[options]
; This is the password that allows database operations:
admin_passwd = strong_password
db_host = False
db_port = False
db_user = odoo
db_password = False
xmlrpc_port = 8069
; longpolling_port = 8072
logfile = /var/log/odoo13/odoo.log
logrotate = True
addons_path = /opt/odoo/odoo13/addons,/opt/odoo/odoo13-custom-addons
$ sudo vim /etc/systemd/system/odoo13.service
[Unit] Description=Odoo13 #Requires=postgresql-10.6.service #After=network.target postgresql-10.6.service [Service] Type=simple SyslogIdentifier=odoo13 PermissionsStartOnly=true User=odoo Group=odoo ExecStart=/opt/odoo/odoo13-venv/bin/python3 /opt/odoo/odoo13/odoo-bin -c /etc/odoo.conf StandardOutput=journal+console [Install] WantedBy=multi-user.target
$ sudo systemctl daemon-reload
$ sudo systemctl start odoo13 $ sudo systemctl enable odoo13
$ sudo systemctl status odoo13
$ yum -y install net-tools
$ sudo netstat -pnltu | grep 8069
$ sudo firewall-cmd --add-port=8069/tcp --zone=public --permanent $ sudo firewall-cmd --reload
$ sudo dnf install nginx
$ sudo vim /etc/nginx/conf.d/odoo13.conf
siguiendo lo de mas abajo.
upstream odoo { server 127.0.0.1:8069; } server { listen 80; server_name server-IP; access_log /var/log/nginx/odoo13.access.log; error_log /var/log/nginx/odoo13.error.log; location / { proxy_set_header X-Forwarded-Host $host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Real-IP $remote_addr; proxy_redirect off; proxy_pass http://odoo; } location ~* /web/static/ { proxy_cache_valid 200 90m; proxy_buffering on; expires 864000; proxy_pass http://odoo; } gzip_types text/css text/less text/plain text/xml application/xml application/json application/javascript; gzip on; }
$ sudo systemctl start nginx $ sudo systemctl enable nginx
$ sudo systemctl status nginx
http://tu-server/
500 internal server error (Linux)
OperationalError: FATAL: role "root" does not exist
You find this error in file : /var/log/postgrsql/postgrsql-10-main.log (on linux system)
The solution may be :
1- Open Terminal and enter => sudo su postgres
2- Enter password for postgres System user (if it is necessary)
3- createuser odoo -s
4- psql template1
5- alter role odoo with password 'yourpassword';
6- \q
7- exit
8- service odoo restart
Now try again to localhost:8069
*The C programming language provides many standard library functions for file input and output. These functions make up the bulk of the C standard library header <stdio.h>.
Each of the header files has a specific purpose and any or all of them can be included in any program.
Your C compiler uses the double quote marks to indicate that the search for the "include" file will begin in the current directory, and if it not found there, the search will continue in the "include" directory as set up in the environment.
C – stdio.h library functions
********All C inbuilt functions which are declared in stdio.h header file are given below.********
List of inbuilt C functions in stdio.h file:
printf() This function is used to print the character, string, float, integer, octal and hexadecimal values onto the output screen
scanf() This function is used to read a character, string, numeric data from keyboard.
getc() It reads character from file
gets() It reads line from keyboard
getchar() It reads character from keyboard
puts() It writes line to o/p screen
putchar() It writes a character to screen
clearerr() This function clears the error indicators
f open() All file handling functions are defined in stdio.h header file
f close() closes an opened file
getw() reads an integer from file
putw() writes an integer to file
f getc() reads a character from file
putc() writes a character to file
f putc() writes a character to file
f gets() reads string from a file, one line at a time
f puts() writes string to a file
f eof() finds end of file
f getchar reads a character from keyboard
f getc() reads a character from file
f printf() writes formatted data to a file
f scanf() reads formatted data from a file
f getchar reads a character from keyboard
f putchar writes a character from keyboard
f seek() moves file pointer position to given location
SEEK_SET moves file pointer position to the beginning of the file
SEEK_CUR moves file pointer position to given location
SEEK_END moves file pointer position to the end of file.
f tell() gives current position of file pointer
rewind() moves file pointer position to the beginning of the file
putc() writes a character to file
sprint() writes formatted output to string
sscanf() Reads formatted input from a string
remove() deletes a file
fflush() flushes a file
The FDA also shortened the time for booster shots from at least six months after completion of the initial series to at least five months, for everyone aged 12 and older.
WASHINGTON, Jan. 3 (Xinhua) -- The U.S. Food and Drug Administration (FDA) on Monday expanded the emergency use authorization for the Pfizer-BioNTech COVID-19 vaccine boosters to children ages 12 to 15.
The FDA also shortened the time for booster shots from at least six months after completion of the initial series to at least five months, for everyone aged 12 and older.
The agency has determined that the protective health benefits of a single booster dose of the Pfizer-BioNTech COVID-19 vaccine to provide continued protection against COVID-19 and the associated serious consequences outweigh the potential risks in individuals ages 12 to 15.
The agency said that it found "no new safety concerns" following a booster shot in young teenagers, and that there were no new reports of two types of heart inflammation called myocarditis or pericarditis linked to the boosters.
The decision came as the Omicron variant is spreading rapidly across the United States and has led to record high hospitalizations among younger people.
Andrés Reyes, Rodrigo Matus y Bárbara Gálvez fueron separados de la Unidad de Desarrollo, Sistemas y Soporte. Esta determinación la tomó la dirección de Junaeb luego que nuestros compañeros hicieran ver actos de negligencia, así como la nula participación en la cotización y adquisición de sistemas informáticos, softwares y tecnologías de información en general.
“Solicitamos una reunión hace más de un año con el director, para informar que los procesos informáticos iban mal, que no se puede externalizar los procesos que son propios de Junaeb que era un riesgo latente. Hoy todas las compras de desarrollo se encuentran sin avances y algunos proveedores han abandonado los proyectos, si nos movilizamos es porque necesitábamos ayuda para tomar medidas que permitieran minimizar el impacto en los beneficiarios. Realizamos un petitorio por un trato digno bajo el marco de respeto y fuimos castigados, sin importar el gesto noble de alertar”,
Afaeb está asesorando y apoyando a los trabajadores involucrados y luego de conocer los detalles de la situación condenó enérgicamente el actuar de la Dirección de Junaeb: “Creemos que es una nueva manifestación del estilo autoritario y anti trabajadores de la administración de Jaime Tohá, quien claramente está malusando las herramientas administrativas para amedrentar y coartar la acción funcionaria. No aceptaremos estas malas prácticas, por eso iniciaremos acciones judiciales para que se restablezcan en sus funciones a los compañeros removidos, pues no obedece a motivos técnicos, sino meramente revanchistas”, advirtió Carolina Pizarro, presidenta de AFAEB.
Esta no es una situación aislada, se trata de una política institucional de maltrato y abandono para posteriormente justificar nuevas externalizaciones. Actualmente, la Dirección Nacional de Junaeb enfrenta más de 10 presentaciones realizadas en la Contraloría General de la República entre los años 2020 y 2021 por maltrato y acoso laboral, conflictos de interés, faltas graves a la probidad administrativa, irregularidad en licitaciones públicas, entre otros. Además, hay más de 7 acciones judiciales presentadas ante Tribunales del Trabajo y Cortes de Apelaciones por eventual vulneración por discriminación arbitraria, integridad física y psíquica, así como despidos arbitrarios.
La tarde de este miércoles se darán a conocer los resultados del nivel socioeconómico del FUAS.
Hoy se darán a conocer los resultados socioeconómicos del Formulario Único de Acreditación Socioeconómica (FUAS), un cuestionario creado por el Ministerio de Educación (Mineduc) para facilitar la inscripción simultánea a todas las becas y ayudas del Estado para estudiantes de educación superior.
Son 18 los beneficios disponibles en total, entre gratuidad, becas, fondos y créditos. Tomando en cuenta que estudiar una carrera universitaria implica grandes gastos que no todos pueden costear, estos beneficios estatales significan una gran oportunidad para quienes buscan avanzar hacia la educación superior, pero que no tienen los medios para pagarla.
Si ya postulaste al FUAS 2022 y quieres conocer tus resultados, te explicamos a continuación cómo hacerlo.
Los resultados del FUAS se publican este miércoles 22 de diciembre a las 15.00 horas. Para conocer tus resultados deberás ingresar AQUÍ.
Ten presente que estos son solo los resultados socioeconómicos, es decir solo se informará a los postulantes si cumplen con los requisitos socioeconómicos para optar a los beneficios.
Recién el 20 de enero de 2022 se conocen los resultados de preselección, que indican si el postulante cumple los otros requisitos para obtener los beneficios.
Luego, el 25 de enero comienza el proceso de matrículas. Después de esto, cuando el estudiante esté matriculado en una carrera, se hacen válidos los beneficios obtenidos en la preselección y el Mineduc publica los resultados finales de asignación.
1) What is Web API?
WebAPI is a framework which helps you to build/develop HTTP services.
2) Why is Web API required? Is it possible to use RESTful services using WCF?
Yes, we can still develop RESTful services with WCF. However, there are two main reasons that prompt users to use Web API instead of RESTful services.
3) Why select Web API?
4) Is it right that ASP.NET Web API has replaced WCF?
It’s a not at all true that ASP.NET Web API has replaced WCF. In fact, it is another way of building non-SOAP based services, i.e., plain XML or JSON string.
Advantages of Web API are:
6) What are main return types supported in Web API?
A Web API controller action can return following values:
7) Web API supports which protocol?
Web App supports HTTP protocol.
8) Which .NET framework supports Web API?
NET 4.0 and above version supports web API.
9) Web API uses which of the following open-source library for JSON serialization?
Web API uses Json.NET library for JSON serialization.
10) By default, Web API sends HTTP response with which of the following status code for all uncaught exception?
500 – Internal Server Error
11) What is the biggest disadvantage of “Other Return Types” in Web API?
The biggest disadvantage of this approach is that you cannot directly return an error code like 404 error.
Following is the way to construct to do so,
public class TestController : ApiController { public HttpResponseMessage Get() { HttpResponseMessage response = Request.CreateResponse(HttpStatusCode.OK, "value"); response.Content = new StringContent("Testing", Encoding.Unicode); response.Headers.CacheControl = new CacheControlHeaderValue() { MaxAge = TimeSpan.FromMinutes(20) }; return response; } }
13) What is Web API Routing?
Routing is pattern matching like in MVC.
All routes are registered in Route Tables.
For example:
Routes.MapHttpRoute( Name: "ExampleWebAPIRoute", routeTemplate: “api/{controller}/{id} defaults: new { id = RouteParameter.Optional}
14) What is SOAP?
SOAP is an XML message format used in web service interactions. It allows to send messages over HTTP or JMS, but other transport protocols can be used. It is also an XML-based messaging protocol for exchanging information among computers.
15) What is the benefit of using REST in Web API?
REST is used to make fewer data transfers between client and server which make it an ideal for using it in mobile apps. Web API also supports HTTP protocol. Therefore, it reintroduces the traditional way of the HTTP verbs for communication.
16) How can we use Web API with ASP.NET Web Form?
Web API can be used with ASP.NET Web Form
It can be performed in three simple steps:
17) How to you can limit Access to Web API to Specific HTTP Verb?
Attribute programming plays a important role. It is easy to restrict access to an ASP.NET Web API method to be called using a particular HTTP method.
18) Can you use Web API with ASP.NET Web Form?
Yes, It is possible to use Web API with ASP.Net web form. As it is bundled with ASP.NET MVC framework. However, it can be used with ASP.NET Web Form.
We can give alias name for Web API action same as in case of ASP.NET MVC by using “ActionName” attribute as follows:
[HttpPost] [ActionName("SaveStudentInfo")] public void UpdateStudent(Student aStudent) { StudentRepository.AddStudent(aStudent); }
20) What is the meaning of TestApi?
TestApi is a utility library of APIs. Using this library tester developer can create testing tools and automated tests for a .NET application using data-structure and algorithms.
21) Explain exception filters?
It will be executed when exceptions are unhandled and thrown from a controller method. The reason for the exception can be anything. Exception filters will implement “IExceptionFilter” interface.
22) How can we register exception filter from the action?
We can register exception filter from action using following code:
[NotImplExceptionFilter] public TestCustomer GetMyTestCustomer(int custid) { //write the code }
23) How you can return View from ASP.NET Web API method?
No, we can’t return a view from ASP.NET Web API Method. Web API creates HTTP services that render raw data. However, it’s also possible in ASP.NET MVC application.
24) How to register exception filter globally?
It is possible to register exception filter globally using following code-
GlobalConfiguration.Configuration.Filters.Add(new
MyTestCustomerStore.NotImplExceptionFilterAttribute());
25) Explain what is REST and RESTFUL?
REST represents REpresentational State Transfer; it is entirely a new aspect of writing a web app.
RESTFUL: It is term written by applying REST architectural concepts is called RESTful services. It focuses on system resources and how the state of the resource should be transported over HTTP protocol.
26) Give me one example of Web API Routing?
Config.Routes.MapHttpRoute( name: "MyRoute,"//route name routeTemplate: "api/{controller}/{action}/{id}",//as you can see "API" is at the beginning. defaults: new { id = RouteParameter.Optional } );
27) How can you handle errors in Web API?
Several classes are available in Web API to handle errors. They are HttpError, Exception Filters, HttpResponseException, and Registering Exception Filters.
28) What New Features comes with ASP.NET Web API 2.0?
The latest features of ASP.NET Web API framework v2.0 are as follows:
29) How can you restrict access methods to specific HTTP verbs in Web API?
With the help of Attributes (like HTTP verbs), It is possible to implement access restrictions in Web API.
It is possible to define HTTP verbs as an attribute to restrict access.
Example:
[HttpPost] public void Method1(Class obj) { //logic
30) How can you pass multiple complex types in Web API?
Two methods to pass the complex types in Web API –
Using ArrayList and Newtonsoft array
31) Write a code for passing ArrayList in Web API?
ArrayList paramList = new ArrayList(); Category c = new Category { CategoryId = 1, CategoryName =“MobilePhones”}; Product p = new Product { Productcode = 1, Name = “MotoG”, Price = 15500, CategoryID = 1 }; paramList.Add(c); paramList.Add(p);
32) Name the tools or API for developing or testing web api?
Testing tools for web services for REST APIs include:
33) What is REST?
REST is architectural style. It has defined guidelines for creating services which are scalable. REST used with HTTP protocol using its verbs GET, PUT, POST and DELETE.
34) How to unit test Web API?
We can perform a Unit test using Web API tools like Fiddler.
Here, are some setting to be done if you are using
Fiddler –Compose Tab -> Enter Request Headers -> Enter the Request Body and execute
35) How can we restrict access to methods with specific HTTP verbs in Web API?
Attribute programming is widely used for this functionality. Web API also allows restricting access of calling methods with the help of specific HTTP verbs. It is also possible to define HTTP verbs as attribute over method.
36) What is the usage of DelegatingHandler?
DelegatingHandler is used in the Web API to represent Message Handlers before routing.
37) How can we register exception filter from the action?
We can register exception filter from action using following code
[NotImplExceptionFilter] public TestCust GetMyTestCust (int custno) { //write the code }
38) Tell me the code snippet to show how we can return 404 errors from HttpError?
Code for returning 404 error from HttpError
string message = string.Format(“TestCustomer id = {0} not found”, customerid);
return Request.CreateErrorResponse(HttpStatusCode.NotFound, message);
39) Explain code snippet to register exception filters from controller?
[NotImplExceptionFilter] public class TestCustController : Controller { //Your code goes here }
40) Web API supports which protocol?
Web App support HTTP protocol
41) Which of the following .NET framework supports Web API?
Web API is supported by NET 4.0 version
42) Web API uses which library for JSON serialization?
Web API uses Json.NET library for JSON serialization.
43) By default, Web API sends HTTP response with which of the following status code for all uncaught exception?
500 – Internal Server Error
44) Explain method to handle error using HttpError in Web API?
In WEB API HttpError used to throw the error info in the response body. “CreateErrorResponse” method is can also use along with this, which is an extension method defined in “HttpRequestMessageExtension.”
45) How can we register exception filter globally?
We can register exception filter globally using following code:
GlobalConfiguration.Configuration.Filters.Add (new MyTestCustomerStore.NotImplExceptionFilterAttribute());
46) How to handle errors in Web API?
Several classes are available in Web API to handle errors. They are HttpError, HttpResponseException, Exception Filters, Registering Exception Filters.
47) What is the benefit of WebAPI over WCF?
WCF services use the SOAP protocol while HTTP never use SOAP protocol. That’s why WebAPI services are lightweight since SOAP is not used. It also reduces the data which is transferred to resume service. Moreover, it never needs too much configuration. Therefore, the client can interact with the service by using the HTTP verbs.
48) State differences between MVC and WebAPI
MVC framework is used for developing applications which have User Interface. For that, views can be used for building a user interface.
WebAPI is used for developing HTTP services. Other apps can also be called the WebAPI methods to fetch that data.
49) Who can consume WebAPI?
WebAPI can be consumed by any client which supports HTTP verbs such as GET, PUT, DELETE, POST. As WebAPI services don’t need any configuration, they are very easy to consume by any client. Infract, even portable devices like Mobile devices can easily consume WebAPI which is certainly the biggest advantages of this technology.
50) How can we make sure that Web API returns JSON data only?
To make Web API serialize the returning object to JSON format and returns JSON data only. For that you should add the following code in WebApiConfig.cs class in any MVC Web API Project:
//JsonFormatter //MediaTypeHeaderValue Config.Formatters.JsonFormatter.SupportedMediaTypes.Add(new MediaTypeHeaderValue("application/json")); 1 2 3 //JsonFormatter //MediaTypeHeaderValue Config.Formatters.JsonFormatter.SupportedMediaTypes.Add(new MediaTypeHeaderValue("application/json"))